Subject | RE: [IBO] Transaction Advice Needed |
---|---|
Author | Paul Hope |
Post date | 2004-07-20T09:39:06Z |
Hi Tim
You have a specific TIB_transaction on the form or the default transaction
is an individual object spawned for that instance rather than sharing a
central default transaction? You use autocommit but call commit when the
form is closed?
Regards
Paul
> I have had similar problems in the past, using Sybase and Delphi 5 withJust to sure what you are saying here . . .
> other data access objects. (In other words, not just with IBO)
>
> What I was told was that everything - INCLUDING just a normal "select" -
> starts a transaction. So if you leave a data aware object open, you get a
> long - running transaction.
>
> The solution I have come up with for my own applications is to make sure
> that every transaction, including selects, is kept as short as possible.
> The user will only ever see information that is immediately relevant to
> the
> task he is doing now. All selects happen within transactions. All SQL
> happens within a transaction.
>
> As far as forms (with data aware objects on them) goes, as soon as they
> become hidden, they are closed. During the OnClose event, any datasets
> that
> they may call are explicitly committed and closed.
You have a specific TIB_transaction on the form or the default transaction
is an individual object spawned for that instance rather than sharing a
central default transaction? You use autocommit but call commit when the
form is closed?
Regards
Paul
>
> In addition, all of my applications have several data modules. Each data
> module has a "closealldatasets" procedure that I write and call when the
> data module is closed. A "commondb" pas file has functions like
> "closequery" and "closesp" that take a dataset of the relevant type and
> commit the transaction and close the data set.
>
> It sounds like a lot of work. But it keeps the application robust ....
>
> HTH
>
> Tim
>