Subject | Instructions sequence (2nd post) |
---|---|
Author | Fabio Bot <fabiobot@yahoo.com.br> |
Post date | 2003-02-03T12:32:25Z |
>> with IB_Cursor doWhy need starts transaction always before prepare?
>> begin
>> Prepare;
>> if not IB_Transaction.InTransaction then
>> IB_Transaction.StartTransaction;
>> <--- THIS MUST BE DONE BEFORE THE PREPARE.
The instructions sequence below is wrong?
with IB_Cursor do
begin
//*** here ib_transaction.started is false
Prepare;
//*** here ib_transaction.started is true
IB_Transaction.StartTransaction;
//... do something (Edit, Insert, ...)
IB_Transaction.Commit;
IB_Transaction.StartTransaction;
//... do something (Edit, Insert, ...)
IB_Transaction.Commit;
UnPrepare;
end;
Thanks,
Fábio.