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).