Can't perform operation on active transaction.
Posted: Fri 15 Jul 2011 13:35
Very often in my application this error occurs. Here's an example snippet. The code is called periodically by the timer. I use a separate transaction, and the database connection has autocommit set to false.
After error each query connected to a database generates that error.
It seems to me that the error occurs after some time of user inactivity (the application in the taskbar).
Example code:
if datamodule1.fakt_przek_list.Active then datamodule1.fakt_przek_list.Close;
datamodule1.fakt_przek_list.ParamByName('DZIAL').AsString := g_uzyt_dzial;
datamodule1.fakt_przek_list.Open; //ERROR Can't perform operation on active transaction.
After error each query connected to a database generates that error.
It seems to me that the error occurs after some time of user inactivity (the application in the taskbar).
Example code:
if datamodule1.fakt_przek_list.Active then datamodule1.fakt_przek_list.Close;
datamodule1.fakt_przek_list.ParamByName('DZIAL').AsString := g_uzyt_dzial;
datamodule1.fakt_przek_list.Open; //ERROR Can't perform operation on active transaction.