Consultor Eletrônico



Kbase P101260: "Invalid transaction state" error when disconnecting an ODBC/JDBC client while there are active tran
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   11/16/2009
Status: Unverified

SYMPTOM(s):

Error when disconnecting an ODBC client (using the SQLDisconnect method) while there are active transactions

[DataDirect][ODBC PROGRESS driver]Invalid transaction state

Exception when disconnecting an JDBC client (using the Connection.close() method) while there are active transactions

[JDBC Progress Driver]:Invalid transaction state

Some ODBC / JDBC clients ignore the error and leave phantom connections to the database

FACT(s) (Environment):

Progress 9.1x
All Supported Operating Systems

CAUSE:

This is expected behavior. The SQL-92 standard states that an exception should be thrown if there are any active transactions within the connection.

FIX:

JDBC:
Perform a Connection.rollback() or Connection.commit() before the Connection.close().
ODBC:
Perform a Rollback or Commit (using SQLEndTran / SQLTransact) before disconnecting.