Close menu

SQL/R A.03.00 64-bit ODBC driver on UNIX

The ODBC client software ("ODBC driver") is included in the HP-UX and Linux distributions and installed below the /opt/sqlr2/lib (32-bit client) and/or /opt/sqlr2/lib64 (64-bit client) directories.

On platforms that include the 64-bit client, an additional variant of the client is installed that supports the Microsoft 64-bit ODBC API definition.

This client library is named libsqlrodbc64.

Technical background:

When the ODBC functionality was first used on 64-bit HP-UX and Linux platforms, for example with Apache/PHP through the unixODBC driver manager, the Microsoft 64-bit ODBC API definition was not yet published.

However, as a 64-bit API was required but no standard was available yet, implementations such as the unixODBC driver manager derived the 64-bit ODBC API from the 32-bit ODBC API.
This 64-bit API definition, nowadays known as LEGACY_64_BIT_MODE is incompatible with the meanwhile published Microsoft 64-bit ODBC API definition, as it uses 32-bit data types for SQLLEN, SQLULEN and SQLSETPOSIROW, while Microsoft defines these data types as 64-bit.

As a consequence, when using 64-bit ODBC on HP-UX or Linux, the application must match the API of both the driver manager and the ODBC client library.

If the application uses the LEGACY_64_BIT_MODE API, the driver manager and the ODBC client library must both support this API. For SQL/R, this means that the libsqlrodbc ODBC driver library must be used.

If the application uses the Microsoft 64-bit ODBC API (also known as REAL_64_BIT_MODE), the driver manager and the ODBC client library must both support this API. For SQL/R, this means that the libsqlrodbc64 ODBC driver library must be used.