What does the ODBC-ODBC Bridge do if an application terminates abnormally?

If an application terminates abnormally (for example, it crashes or receives a SIGINT), the operating system closes the socket connection to the Easysoft ODBC-ODBC Bridge server.

The ODBC-ODBC Bridge server notices the closed socket connection and attempts to tidy up the ODBC connection. It loops through all affected connections and calls SQLDisconnect for each one. If a connection returns SQLSTATE 25000 ("transaction in progress"), the server calls SQLEndTran(SQL_ROLLBACK) to roll back the transaction so that the connection can be closed. All ODBC driver handles are then freed with SQLFreeHandle.

For example, you turn off autocommit in Perl and update a table row; Perl terminates before you commit the transaction. To handle this, the ODBC-ODBC Bridge server rolls back the updates so it can the close the ODBC driver connection.

Note The ODBC-ODBC Bridge server only notices the disconnected client when the ODBC Driver Manager and ODBC driver return from the last ODBC call. If you run a query and kill your client application while the query is executing, the server doesn't drop the connection until the query completes.