Easysoft ODBC-ODBC Bridge

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

Article:
00629
Last Reviewed:
12th January 2024
Revision:
2

If an application terminates abnormally e.g. the application seg faults or is interrupted with SIGINT, the socket connection to the Easysoft ODBC-ODBC Bridge server will be closed by the operating system.

The ODBC-ODBC Bridge server spots the closed socket connection and attempts to tidy up the ODBC connection to the ODBC driver. It will loop through all connections created by that client and call SQLDisconnect for each one. If any fail to disconnect due to SQLSTATE 25000 (transaction in progress), the server will call SQLEndTran(SQL_ROLLBACK), i.e. it will attempt to roll back the transaction so the connection may be closed. All handles in the ODBC driver are freed with SQLFreeHandle.

As an example, if you had some Perl that ran through ODBC-ODBC Bridge and it turned off autocommit, updated a row in a table and then Perl was stopped before the transaction was committed, the ODBC-ODBC Bridge server would roll back the updates so the connection to the ODBC driver could be closed.

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. As a result, if you execute a query and kill your client application whilst the query is executing, the connection will not be dropped by the server until the query has completed.

Applies To

Knowledge Base Feedback

* Did this content help you?
* Please select one option based on your first choice:

(* Required Fields)