The DataFlex ODBC Driver is used to access ODBC databases from DataFlex programs. ODBC (Open DataBase Connectivity) is an industry standard that allows programs to access multiple database types without the need to rewrite the code for the program or having to re-link the program. A variety of database management systems can be accessed through ODBC. These include enterprise database systems such as Oracle, Sybase, SQL Server, flat file systems like dBase, Paradox and even non-database systems like Excel and ASCII.
Many existing DataFlex applications, without change, will be able to use these non-DataFlex database systems. Some other DataFlex applications require changes in order to make them perform well with these database systems.
ODBC or Open DataBase Connectivity defines a method of connecting to data sources that are open to as many applications and data sources as possible. To accomplish this, the application and the data source have agreed upon a common method to access the database. This agreement defines a complete set of API function calls and a complete SQL syntax set together forming ODBC.
The database side of this open connectivity is provided by drivers, contained in Dynamically Linked Libraries (DLLs). These drivers transform the ODBC API functions into functions supported by the particular data source being used. The ODBC SQL syntax is translated in a similar way into syntax accepted by the data source. The manufacturer of the database system usually produces these drivers, but there are many third party vendors as well.
The ODBC architecture consists of four major components. They are described as follows.
A Data Source identifies the server and database therein that will be accessed. A Data Source defines the ODBC driver to use for the connection. Depending on the driver it also defines the location of the data, the server on which the data resides, the database in which the data resides and so forth.
Data Sources are created through the ODBC Administrator; the administrator can be started from the Administrative Tools option in the Windows Control Panel or from the DataFlex Database Builder.
The driver is a DLL that sits between the driver manager and the data source. It processes ODBC function calls. It passes commands from the application to the data source, after possible translation. It also receives the result for the commands from the data source and passes it back to the application
This DLL is generally provided by Microsoft as part the ODBC installation. It loads driver DLLs and directs function calls to them.
A program that processes data.
It is important to understand that ODBC is designed to expose database capabilities, not supplement them. Thus, application writers should not expect that ODBC would suddenly transform a simple database into a fully featured relational database engine. Nor are driver writers expected to implement functionality not found in the underlying database.
The Data Access Database API expects database drivers to support a certain set of attributes for a table. These attributes may or may not be available in the supported backend. If such an attribute is not available in the backend, it needs to be stored somewhere outside of the backend database. The API uses so called “intermediate files” to store such information. The contents of an intermediate file are partly API defined and partly driver specific.
The DataFlex ODBC Driver will use the backend for its attributes whenever possible. The goal is to keep the intermediate file as small as possible. Some information can only be stored in the intermediate file because ODBC does not support the attribute essential to DataFlex. The DataFlex ODBC Driver expects an intermediate file to be present for every table that is accessed through it.
A design goal of the ODBC client was that a DataFlex program should be able to switch the underlying database to ODBC without the need to adjust that program.