Reputation: 31
I am using odbc 3.0 with Informix and I receive the error "Invalid Transaction State" when attempting to sqldisconnect. The beginwork and commit/rollback are in a while loop and all the tranactions work as desired (data is saved correctly); I just get the disconnect error. What is funny is that, if I do one commit/rollback outside the while loop, the data is still saved as desired but I do not get this error. It appears that doing a fetch on the data when there are no rows left is what is causing the issue.
Any ideas or thoughts?
Thanks in Advance
Upvotes: 0
Views: 4097
Reputation: 767
Check if you have set "connection.setAutoCommit(false);"
In this case make sure you commit/rollback all the changes before the connection is being closed.
Upvotes: 2