Cannot disconnect database with open transactions
Posted: 13.07.2007, 03:46
Hi
I have a Firebird database and I am getting an exception when creating a unique index on a table. The table is populated with data first and then the index is created. Index is created using TZQuery component. Everything works fine if there are no duplicate records in the table, but if there are duplicate records then I get an exception, and if I try to close the database connection I also get following error...
Project Project1.exe raised exception class EZSQLException with message 'SQL Error: cannot disconnect database with open transactions (1 active). Error Code: -901. Unsuccessful execution caused by system error that does not preclude successful execution of subsequent statements'.
This results in database file being locked and I cannot delete the file. The only way to delete the database file is to close the app.
It looks like there is a bug in Zeos(Firebird part) which doesn't allow the connection to be closed if there are active transactions. I think all active transaction(s) should be rolled back if the connection is closed.
I am not using the latest SVN version.
Regards
Sandeep
I have a Firebird database and I am getting an exception when creating a unique index on a table. The table is populated with data first and then the index is created. Index is created using TZQuery component. Everything works fine if there are no duplicate records in the table, but if there are duplicate records then I get an exception, and if I try to close the database connection I also get following error...
Project Project1.exe raised exception class EZSQLException with message 'SQL Error: cannot disconnect database with open transactions (1 active). Error Code: -901. Unsuccessful execution caused by system error that does not preclude successful execution of subsequent statements'.
This results in database file being locked and I cannot delete the file. The only way to delete the database file is to close the app.
It looks like there is a bug in Zeos(Firebird part) which doesn't allow the connection to be closed if there are active transactions. I think all active transaction(s) should be rolled back if the connection is closed.
I am not using the latest SVN version.
Regards
Sandeep