Subject | RE: [firebird-support] Re: InterBase, Dephi, BDE and Transactions |
---|---|
Author | Helen Borrie |
Post date | 2004-11-16T15:05:41Z |
At 11:47 AM 16/11/2004 -0300, you wrote:
control of the transaction".
submitting a SELECT request and asking Delphi to keep fetching until the
buffer is filled. If the query isn't prepared, Delphi sets up the stuff
for the prepare and asks the databases to prepare it. The Prepare returns
a whole lot of stuff from the database, before Open gets called.
The point is, that all of the above things happen INSIDE the context of the
transaction. If there is no transaction, there is nothing.
Helen
./h
>Helen:No. I said "You could have done this (if you wanted to take explicit
>
> I don't understand. You say
>"Next, if Delphi gets an Open call and there is no transaction, it starts
>one."
>
>and tell me to write:
> if DataBaseGeneral.InTransaction then
> begin
> DataBaseGeneral.Commit;
> DataBaseGeneral.StartTransaction;
control of the transaction".
>Do I have to write this before or after the Open?If you do it, it has to be BEFORE the Open. An Open is nothing but
submitting a SELECT request and asking Delphi to keep fetching until the
buffer is filled. If the query isn't prepared, Delphi sets up the stuff
for the prepare and asks the databases to prepare it. The Prepare returns
a whole lot of stuff from the database, before Open gets called.
The point is, that all of the above things happen INSIDE the context of the
transaction. If there is no transaction, there is nothing.
Helen
>Anyway, I think it won't do nothing because DataBaseGeneral.InTransaction:-|
>is False in both cases.
./h