Overview of the IBM i Access ODBC driver

Provides a general description of ODBC, and how you can use it with IBM® i Access Client Solutions.

The IBM i Access ODBC driver is a collection of application programming interfaces (APIs) for accessing database information using Structured Query Language (SQL). Using the IBM i Access ODBC driver allows applications to access different databases using the same source code, and to handle data in the format most convenient for those applications. ODBC provides an application developer a relatively simple model for creating portable applications or components that must deal with multiple DBMSs.

The ODBC architecture involves an application, driver manager, ODBC driver, and a data source. IBM i Access provides both a 32-bit and a 64-bit ODBC driver. ODBC applications will automatically use the appropriate driver that corresponds to the bit version the application was compiled for.

For an application to use ODBC you must set up a data source. You can use the ODBC Administrator to set up a data source. There are two versions of the ODBC Administrator, 32-bit and 64-bit, that can be accessed from the IBM i Access Client Solutions folder. When using ODBC Administrator, you have the option to setup three different types of data sources: User, System, and File data sources. For more information about how data sources are configured, see 64-bit ODBC Support, in the IBM i Access Client Solutions' User's Guide.

ODBC components

Application. Performs processing and calls ODBC functions to run SQL statements.

Driver manager. Processes ODBC function calls and forwards the requests to the driver.

Driver. Processes ODBC function calls, submits SQL requests to a specific data source, and returns results to the application.

Data source. To use a data source you have to create a Data Source Name (DSN). A DSN contains information about how to access the DBMS. You can specify any of the following DSNs:

  • User DSN: These data sources are local to a computer and may only be available to the user who created them. This information is stored in the registry.
  • System DSN: These data sources are local to a computer, rather than dedicated to a user. The system, or any user having privileges, can use a data source set up with a system DSN. This information is stored in the registry.
    Note: On Windows, System DSNs are split between 32-bit and 64-bit applications. System DSNs configured using the 32-bit ODBC Administrator are available only to 32-bit applications, and those configured using the 64-bit ODBC Administrator are available only to 64-bit applications.
  • File DSN: These are file-based data sources that may be shared between all users that have the same drivers installed so that they have access to the database. These data sources do not need to be dedicated to a user, or to be local to a computer.

For more information about ODBC, refer to the Microsoft Web site.