error Can't perform operation on active transaction

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Burth
Posts: 7
Joined: Tue 16 Jan 2007 12:58

error Can't perform operation on active transaction

Post by Burth » Thu 05 Jul 2007 12:52

Hello,

i have migrate (with the wizard) my project from BDE to IBDAC2.

wihle execute starttransaction the message "Can't perform operation on active transaction" is announced. Some TIBCQuerys are open with the flag read only. The isolation level is like BDE ReadCommitted.

:arrow: form1.zpm_db.starttransaction;
try
update_patient.execsql;
update_beleg.execsql;
if optag-1 then update_opplan.execsql;
form1.zpm_db.commit;
except
form1.zpm_db.rollback;
messagedlg('ERROR',mterror,[mbok],0);
end;


Best regards

Roland

Alex
Posts: 655
Joined: Mon 08 Nov 2004 08:39

Post by Alex » Sat 07 Jul 2007 10:45

As I can see from the exception message, you are trying to start already started transaction. This could happen if you have, for example, active datasets linked to this transaction, or there was call to IBCSQL.Execute with AutoCommit = False, or some other operation that implicitly leaves a transaction alive.
Note that an active dataset requires active connection and transaction, if you commit the datasets transaction, you close all linked datasets.

Post Reply