Subject CommitRetaining
Author Josh Higgs
Good morning all

IBObjects Sub-Release: 4.2 Ib
Interbase: 6.0.1.6
Delphi: 5

Can anyone please explain why this happens:

From the first time I call CommitRetaining, all subsequents calls to
IB_Transaction.inTransaction result in false? This means that the final
"subset" of updates never gets committed when using the following construct:

(Excuse missing sourcecode, this gets the point accross)

txn.StartTransaction;
try
try

with qry do
begin
close;
{Set Parameters here}
open;
try
while not eof do
begin
inc(lCurrentRecord);

DoProcessThisRecord....

if (lCurrentRecord mod 10 = 0) then
txn.CommitRetaining; {<-- If this executes ...}

next;
end;
finally
close;
end
end

except
if txn.intransaction then
txn.rollback;
raise;
end;
finally
if txn.intransaction then
txn.commit; {<-- ... This line never executes}
end;

TIA



Josh