This appendix discusses the support provided by the DB2 ODBC driver, and how it differs from DB2 CLI.
Figure 18 below compares DB2 CLI and the DB2 ODBC driver.
DB2 Client refers to all available DB2 Clients. DB2 refers to all DB2 Universal Database products.
In an ODBC environment, the Driver Manager provides the interface to the application. It also dynamically loads the necessary driver for the database server that the application connects to. It is the driver that implements the ODBC function set, with the exception of some extended functions implemented by the Driver Manager. In this environment DB2 CLI conforms to level 2 of ODBC 2.0, and level 1 of ODBC 3.0. In addition it also conforms to the following ODBC 3.0 level 2 interface conformance items:
For ODBC application development, you must obtain an ODBC Software Development Kit (from Microsoft for Microsoft platforms, and from other vendors for non-Microsoft platforms.) When developing ODBC applications that may connect to DB2 servers, use this book (for information on DB2 specific extensions and diagnostic information) in conjunction with the ODBC 3.0 Software Development Kit and Programmer's Reference.
In environments without an ODBC driver manager, DB2 CLI is a self
sufficient driver which supports a subset of the functions provided by the
ODBC driver. Table 187 summarizes the two levels of support, and Table 12 provides a complete list of ODBC 3.0
functions, and indicates if they are supported.
Table 187. DB2 CLI ODBC Support
ODBC Features | DB2 ODBC Driver | DB2 CLI |
---|---|---|
Core Level Functions | All | All |
Level 1 Functions | All | All |
Level 2 Functions | All | All, except for SQLDrivers() |
Additional DB2 CLI Functions | All, functions can be accessed by dynamically loading the DB2 CLI library, see Appendix A, Programming Hints and Tips for more information. |
|
SQL Data Types | All the types listed for DB2 CLI, as well as:
|
|
C Data Types | All the types listed for DB2 CLI. |
|
Return Codes | All the codes listed for DB2 CLI. |
|
SQLSTATES | Mapped to X/Open SQLSTATES with additional IBM SQLSTATES, with the exception of the ODBC type 08S01. | Mapped to X/Open SQLSTATES with additional IBM SQLSTATES |
Multiple connections per application | Supported | Supported |
Dynamic loading of driver | Supported | Not applicable |
For more information on ODBC refer to ODBC 3.0 Software Development Kit and Programmer's Reference.