Connectivity Guide > Connectivity Guide > Understanding ODBC Connectivity > ODBC CLI Implementation Considerations
Was this helpful?
ODBC CLI Implementation Considerations
The ODBC CLI includes two include files for compiling applications:
sql.h
sqlext.h
These files can be found at $II_SYSTEM/ingres/files.
Other standard ODBC includes libraries, such as sqlucode.h or sqltypes.h, are already included within the ODBC CLI version of sql.h and sqlext.h.
UNIX and Linux: The ODBC CLI is installed as the shared library libiiodbc.[ext]. Depending on the UNIX or Linux implementation, the library extension ([ext]) varies. The library resides in $II_SYSTEM/ingres/lib.
Here is an example for building an ODBC CLI application on Linux:
cc -c myOdbcApp.c -I$II_SYSTEM/ingres/files
ld -o myOdbcApp myOdbcApp.o -L$II_SYSTEM/ingres/lib -liiodbc.1
VMS: The library is named ODBCCLIFELIB.EXE and resides in II_SYSTEM:[INGRES.LIBRARY].
ODBC CLI applications link against the appropriate shared library. The logical II_ODBC_CLILIB references the ODBC CLI library. The II_ODBC_CLILIB library is defined by the iisuodbc utility.
ODBC applications can be coded using the ODBC Command Line Interface exactly as if coded with the Microsoft ODBC Driver Manager library or unixODBC Driver Manager library.
Here is an example for building an ODBC CLI application on VMS:
$ CC/nowarn/include=ii_system:[ingres.files] myApp.c
$ LINK myApp.obj, sys$input/opt
ii_odbc_clilib/share
Last modified date: 01/30/2023