DB2 Connect User's Guide

CLI/ODBC

CLI/ODBC is an SQL application programming interface that can be called by your database applications. It passes dynamic SQL statements as database function calls. Unlike embedded SQL it does not require host variables or a precompiler.

When an application program calls CLI/ODBC, the first thing that it must do is to make SQL calls to some of the system catalog tables on the target database in order to obtain information about other database contents. CLI/ODBC applications always access the system catalog tables in this way. There are ten API calls that may be made in order to gather information about the database that is being connected to. These API calls include:

   -   SQLTables
   -   SQLColumns
   -   SQLSpecialcolumns
   -   SQLStatistics
   -   SQLPrimarykeys
   -   SQLForeignkeys
   -   SQLTablePrivileges
   -   SQLColumnPrivileges
   -   SQLProcedures
   -   SQLProcedureColumns.

Further information about these API calls and the tables, refer to the CLI Guide and Reference.

By default, when you connect to a database, your CLI/ODBC application will query the system catalog tables for information about all the database tables in that database. Especially on a large system this can result in a lot of network traffic and considerable delays when starting an application.


[ Top of Page | Previous Page | Next Page ]