Show TOC

Setting up the SAP MaxDB ODBC DriverLocate this document in the navigation structure

Context

You have the following options:

  • Registering the SAP MaxDB ODBC driver in a driver manager.

    You can use the following driver managers:

    • Microsoft Windows: Microsoft ODBC Driver Manager 3.52 or higher

    • Unix and Linux: unixODBC 2.0.9 or higher, iODBC 3.0.5 or higher

  • Linking the SAP MaxDB ODBC driver directly with the application (only on Unix and Linux)

Procedure

  • Registering the ODBC Driver in a Driver Manager

    You can find information about registering an ODBC driver in the driver manager in the documentation provided by the manufacturer of the driver manager.

  • Linking the ODBC Driver with the Application (only on Unix and Linux)

    You can link the SAP MaxDB ODBC driver with the application, either statically ( libsdbodbc.a library) or dynamically ( libsdbodbc.so library).

    In the case of dynamic linkubg, ensure that the system finds the dynamic library libsdbodbc.so when you execute the application by adding the path for libsdbodbc.so to the LD_LIBRARY_PATH environment variable.

    Example

    You compile the application myapp.c with the appropriate ODBC header files:

    cc -c myapp.c -I<ODBC_include>

    You statically link the ODBC driver with the application:

    cc -o myapp myapp.o <ODBC_lib>/libsdbodbc.a

    You dynamically link the ODBC driver with the application:

    cc -o myapp myapp.o -L<ODBC_lib> -lsdbodbc