On Tue, 2006-04-18 at 10:21 -0700, johnf wrote:
> In the Visual FoxPro world I normally would have an object (class) that is
> placed on the form to handle all interaction with the data as required. But
> so far I don't understand how to do this with the SQLdb controls. I could
> create a class to create and set all the SQLdb controls in code but I don't
> understand how to add it (the class) to the forms. Even if I did create the
> class I don't see the advantage over just placing the SQLdb controls directly
> on the forms. OOP for OOP sake does not make much sense. Placing the
> TSQLTransaction on the form handles all the 'Begin' and 'Rollback' issues and
> infact by placing a PQConnection on each form creates a new connection to the
> database - therefore, the database is then responsable for any data locking
> issues. What could easier - I don't have to worry about record locking
> except within the forms access. So you can see I have questions about how
> data is accessed.
I also read that in your wiki-article.
But you can have one connection, whith several transactions bound to it.
PostgreSQL doesn't support that, but SQLdb handles that for you, it
creates new connection internally automatically.
So you could think of 1 connection for the whole aplication, and then
one transaction for each form.
JoJo,
Joost.
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives