2006/4/17, johnf <[EMAIL PROTECTED]>:
> Or is it better (what a word):
>
> sqlunit
>
If you have a 'sqlunit' that handles all the sql stuff of you
application, be object oriented in your concepts. Iwould have only one
function in the sqlunit to close the sql object(s) with proper checks.
If you have an sqltransaction in each form (which looks like), simple
have the procedure in the form or in a descendent of the form.
TMySQLForm = class(TForm) // stuff your sqltransaction object in it
and the procedure. Then inherit from the TMySQLForm
Another simple way is to avoid such a function for a simple task like
that. You could simply execute the code sqltransaction1.active:=False;
in the OnDestroy of the form. With the TMySQLForm example concept it
would be a good idea too. Avoid the procedure for such a simple task.
It is like bloat code ;)
Best Regards.
--
Alexandre Leclerc
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives