evraz001
evraz001

Reputation: 31

ODBC Error "invalid Transaction State"

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

Answers (1)

Techflash
Techflash

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

Related Questions