Easysoft ODBC-ODBC Bridge

Is there any tracing in ODBC-ODBC Bridge I can use for debugging my application?

Last Reviewed:
8th January 2024

The Easysoft ODBC-ODBC Bridge client and server both have a mechanism for creating a trace file. How this is turned on depends on the platform and whether it is the client or server. The types of tracing output may be selected by use of a bitmask. Please treat this as an undocumented feature, as the mechanism for initiating tracing, the bit mask values and where the trace file is written may change. Please also remember that the tracing output was written to help us debug ODBC-ODBC Bridge problems, so there is no documentation on the format or contents of the trace file. Having said this, the information is useful when debugging your application.

Some types of tracing generate a tremendous amount of output. Any kind of tracing will slow the client or server down significantly as the tracing output is flushed to the file on every write.

On non-Windows platforms, tracing is turned on by setting the Logging value in the Settings section of the odbc.ini file in the CURRENT WORKING DIRECTORY to a non-zero value. E.g. your odbc.ini file in the current working directory would look something like this:

attribute = value

Logging = 0xnnnnnn

where the DSNs are optional, as they may be located in another odbc.ini file (e.g. /etc). Note, ODBC-ODBC Bridge only looks for the Logging value in the odbc.ini file in the current working directory. For UNIX, the output trace file is normally named esoobclient.log_PID or esoobserver.log_PID (where PID is the process ID) and will be placed in /tmp UNLESS the file already exists and is a symbolic link.

On Windows, you set the Logging value in the registry key:


For Windows, the output files are esoobclient.log or esoobserver.log and will be placed wherever the LogDir configuration option points.

In both cases, the Logging value is a string value representing a bit mask and may be specified in decimal or in hex (if a 0x is prefixed). The bitmask values are listed below; you should just add up all the ones you want.

Value Description
0x1 Log entry points into functions e.g. the function called and the arguments passed to it. Generally useful for ODBC application developers.
0x2 Log exit points from functions e.g. return status and sometimes other values returned. Generally useful for ODBC application developers.
0x8 Special logging not covered by other bitmasks. It is unlikely much, if anything of this will make a great deal of sense to anyone but Easysoft as it output ODBC-ODBC Bridge internal information.
0x10 OctetLengths, IndicatorPtrs, Row status values etc. in bound parameters, bound columns or getdata.
0x20 Log internal (non-ODBC-API) ODBC-ODBC Bridge function entry/exit points depending on whether 0x1 and/or 0x2 set. Generally speaking, little of this will be useful to anyone who does not know the internals of ODBC-ODBC Bridge.
0x40 Log calls to the ODBC-ODBC Bridge Server (client-side) or ODBC driver (server-side).
0x80 Log ODBC diagnostics. This may create an odbc_bridgec_diags.txt (client) or odbc_bridges_diags.txt (server) file in the LogDir directory. This may be a useful logging option if the code that outputs diagnostics in your application is broken, as the diagnostic will be logged when SQLError or SQLGetDiagRec is called.
0x100 Log query text in SQLPrepare/SQLExecDirect. Another useful one if you want to check what your application is asking the driver to do.
0x200 Log the connection process. This will show how ODBC-ODBC Bridge has retrieved the attributes for your DSN and what it is passing to the ODBC driver.
0x400 Log attribute retrievals or changes e.g. calls to SQLSetConnectAttr and so on.
0x800 Start main ODBC-ODBC Bridge Server logging. There is no ODBC information in this output at all, it simply output outputs what the main ODBC-ODBC Bridge Server is doing before the ODBC connection starts and will generate a huge amount of output over time. The log file is esoobstart.log.
0x1000 Log the actual data sent or retrieved.
0x2000 Output timing information e.g. how long an SQLPrepare, SQLExecDirect took.
Applies To

Knowledge Base Feedback

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

(* Required Fields)