Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » SQL Anywhere Server - Programming » SQL Anywhere ODBC API » Building ODBC applications

Building ODBC applications Next Page

Including the ODBC header file


Every C source file that calls ODBC functions must include a platform-specific ODBC header file. Each platform-specific header file includes the main ODBC header file odbc.h, which defines all the functions, data types, and constant definitions required to write an ODBC program.

To include the ODBC header file in a C source file
  1. Add an include line referencing the appropriate platform-specific header file to your source file. The lines to use are as follows:

    Operating system Include line
    Windows #include "ntodbc.h"
    Unix #include "unixodbc.h"
    Windows CE #include "ntodbc.h"
  2. Add the directory containing the header file to the include path for your compiler.

    Both the platform-specific header files and odbc.h are installed in the h subdirectory of your SQL Anywhere installation directory.