XA Support Through the Windows ODBC Driver Manager

There are issues and procedures for using XA with the Windows ODBC driver manager. Linux or UNIX ODBC driver managers are not considered.

Issues to Consider With the Driver Manager

XA support through the ODBC driver manager requires special handling.

There are two fundamental issues:

  • The XA interface is not part of the defined ODBC interface. If the XA symbols are directly referenced in an application, it is not possible to link with only the driver manager library to resolve all the external references.

  • By design, the driver manager determines which driver .dll file to load at connect time, when you call SQLConnect or SQLDriverConnect. XA dictates that the connection should be opened through xa_open(). But the correct xa_open() entry point cannot be located until the .dll is loaded during the connect operation itself.

Note that the driver manager objective of database portability is generally not applicable here, since each XA implementation is essentially proprietary. The primary benefit of driver manager support for XA-enabled applications is to enable TimesTen-specific applications to run transparently with either the TimesTen direct driver or the TimesTen client/server driver.

Linking to the TimesTen ODBC XA Driver Manager Extension Library

On Windows installations, TimesTen provides a driver manager extension library, ttxadm221.dll, for XA functions. Applications can make XA calls directly, but must link in the extension library.

To link with the ttxadm221.dll library, applications must include ttxadm221.lib before odbc32.lib in their link line. For example:

# Link with the ODBC driver manager
appldm.exe:appl.obj
       $(CC) /Feappldm.exe appl.obj ttxadm221.lib odbc32.lib