Subject | Re: Database file size increases heavily |
---|---|
Author | Marco Menardi |
Post date | 2002-12-03T23:04:18Z |
--- In IBObjects@y..., "Arno Garrels" <arno.garrels@g...> wrote:
property set to tiCommitted, right?
testing for InTransaction, no, if the transaction is already started,
Masterbl.first is inside that transaction.
In any case, your code is upside down.
No
a) Mastertbl.First;
b) DB.StartTransaction;
but
a) DB.StartTransaction;
b) Mastertbl.First;
If you don't carefully manage transactions is such a critical app, you
leave open transactions for sure.
What is DB component? Can't be a IB_Connection, since it has no
StartTransaction method, b ut DB is a strange name for a transaction
component...
Well, if you want, send me the source, I will take a (brief) look at it.
regards
Marco Menardi
> Marco,And you assigned TIB_Connection a transaction component with Isolation
>
>
> > compoent, or you are using <default> value in IB_Transaction property?
>
> I'm a lazy guy so I used default transactions.
property set to tiCommitted, right?
> Nevertheless I gave a transaction placed on the datamodule a try aswell,
> but...Do the above setup, it will not hurt ;)
>If the component uses the same transaction component that you are
> > > Mastertbl.First;
> >
> > The above line starts a transaction!
>
> Didn't know that.
> Even if InTransaction is already true?
testing for InTransaction, no, if the transaction is already started,
Masterbl.first is inside that transaction.
In any case, your code is upside down.
No
a) Mastertbl.First;
b) DB.StartTransaction;
but
a) DB.StartTransaction;
b) Mastertbl.First;
If you don't carefully manage transactions is such a critical app, you
leave open transactions for sure.
What is DB component? Can't be a IB_Connection, since it has no
StartTransaction method, b ut DB is a strange name for a transaction
component...
Well, if you want, send me the source, I will take a (brief) look at it.
regards
Marco Menardi