Home | Previous Page | Next Page   Error Messages > Mapping Informix Error Messages to SQLSTATE Values >

SQLDisconnect

SQLDisconnect closes the connection associated with a specific connection handle.

The following table describes the SQLSTATE and error values for SQLDisconnect.

SQLSTATE Error Value Error Message
01000 -11001 General warning
01002 -11002 Disconnect error
08003 -11017 Connection not open
25000 -11032 Invalid transaction state
S1000 -11060 General error
S1001 -11061 Memory-allocation failure
S1010 -11067 Function-sequence error
08S01 -11301 A protocol error has been detected. Current connection is closed.

Usage

If an application calls SQLDisconnect after SQLBrowseConnect returns SQL_NEED_DATA and before it returns a different return code, the driver cancels the connection-browsing process and returns the hdbc to an unconnected state.

If an application calls SQLDisconnect while an incomplete transaction is associated with the connection handle, the driver returns SQLSTATE 25000 (Invalid transaction state), indicating that the transaction is unchanged and the connection is open. An incomplete transaction is one that was not committed or rolled back with SQLTransact.

If an application calls SQLDisconnect before it frees every hstmt associated with the connection, the driver frees each remaining hstmt after it successfully disconnects from the data source. However, if one or more of the hstmts associated with the connection are still executing asynchronously, SQLDisconnect returns SQL_ERROR with an SQLSTATE value of S1010 (Function sequence error).

Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]