Components of an ODBC connection

How an ODBC connection is made

When you access an ODBC data source in PowerBuilder, your connection goes through several layers before reaching the data source. It is important to understand that each layer represents a separate component of the connection, and that each component might come from a different vendor.

Because ODBC is a standard API, PowerBuilder uses the same interface to access every ODBC data source. As long as a driver is ODBC compliant, PowerBuilder can access it through the ODBC interface to the ODBC Driver Manager. The development environment and the ODBC interface work together as the application component.

Figure 2-1 shows the general components of an ODBC connection.

Figure 2-1: Components of an ODBC connection

The figure illustrates the components of an ODBC connection. At top is the Application, which consists of the Windows development environment and the ODBC  interface called P B O D B n 0 dot D L L. The application elements are connected by two-way arrows to each other and to the next component, the ODBC Driver Manager called ODBC 32 dot D L L. The Driver Manager connects by an arrow to several driver components. These in turn are each connected by two-way arrows to data sources.

Component descriptions

Table 2-1 gives the provider and a brief description of each ODBC component shown in the diagram.

Table 2-1: Provider and function of ODBC connection components

Component

Provider

What it does

Application

Sybase

Calls ODBC functions to submit SQL statements, catalog requests, and retrieve results from a data source.

PowerBuilder uses the same ODBC interface to access all ODBC data sources.

ODBC Driver Manager

Microsoft

Installs, loads, and unloads drivers for an application.

Driver

Driver vendor

Processes ODBC function calls, submits SQL requests to a particular data source, and returns results to an application.

If necessary, translates an application’s request so that it conforms to the SQL syntax supported by the back-end database. See “Types of ODBC drivers”.

Data source

DBMS or database vendor

Stores and manages data for an application. Consists of the data to be accessed and its associated DBMS, operating system, and (if present) network software that accesses the DBMS.