This chapter contains information about ODBC drivers and the Database Access utility.
You can find additional information in the online help.
ODBC is an industry standard application program interface (API) that provides a solution to a common problem--how to write programs that access a Database Management System (DBMS) without making them dependent on specific DBMS designs. ODBC provides API access to SQL-accessible databases, allowing application programs to use SQL to access data from many kinds of sources. The independence of the access method from the original design of the database means that developers can design and produce a single version of an application that can work with, for example, Oracle or Sybase data, without requiring a separate version for each DBMS. Users simply add database drivers to link the application to their choice of DBMS.
ODBC is a component of the Windows® Open Services Architecture (WOSA). Personal Communications supports ODBC 2.0, for development of 32-bit applications for Windows XP.
An ODBC driver provides an application program with standard and uniform SQL access to a DBMS database. An ODBC driver allows the designers and users of the application program to ignore the SQL differences between various DBMS systems.
Figure 1 shows an overview of the Personal Communications Database Access utility and the ODBC DB2® drivers.
There are four components in the ODBC architecture:
From the application program's perspective, the driver manager and the driver appear to be a single unit for processing ODBC function calls. Figure 2 shows the relationship between the four components:
An application using ODBC performs the following tasks:
Any program that accesses a DBMS, such as a spreadsheet, a mail server, or a report generator, can be designed to use ODBC.
The driver manager is a dynamic link library (DLL), the purpose of which is to load drivers. It also performs the following functions:
A driver is a DLL that implements ODBC function calls and interacts with a data source.
The driver manager loads a driver when the application calls the SQLBrowseConnect, SQLConnect, or SQLDriverConnect function.
A driver performs the following tasks in response to ODBC function calls from an application:
A data source is an instance of a DBMS product and any remote operating system and the protocol required to access it.
Database Access lets you access host or PC databases and retrieve data, using ODBC drivers. If you specify the conditions for accessing data in each window, the desired query can be created automatically. See the online help for extensive information on using the Database Access utility with the Personal Communications ODBC drivers.
From Database Access, you can perform any of the following actions:
To access an ODBC data source, do one of the following:
The SQL Data Source window appears.
Select the data source you want to access; then click OK.
To select database tables, do one of the following:
The Tables window appears.
To join conditions for multiple tables, do one of the following:
The Join By window appears.
To select database columns, do one of the following:
The Columns window appears.
To select query conditions for the data, do one of the following:
The Query Conditions window appears.
To select sort conditions for each column, do one of the following:
The Order By window appears.
To view the current SQL statement, do one of the following:
The SQL Statement window appears.
When you use Database Access, the maximum number of each value that can be displayed in the spreadsheet is as follows:
Number of columns | 400 | |
Number of rows | 16350 | |
Column length | 2048 bytes | |
Row length | 2048 bytes | |
SQL statement's length | 32766 bytes |
When you use another application (for example Lotus 1-2-3), refer to the manual for that application because the limit might be different.