BDE API functions

<< Click to Display Table of Contents >>

Navigation:  Basic concepts >

BDE API functions

Previous pageReturn to chapter overviewNext page

The Borland Database Engine (BDE) includes an API for directly using its functionality. The API consists of a set of functions that can be called from any programming language capable of loading Windows DLLs and using functions contained in them. BDE functions are optimized for calling from C or C++; however, Delphi Pascal syntax is also provided in the function reference.

Over the years, two different types of database systems have developed that traditionally supported different data access approaches:

PC-based database systems (such as Paradox, dBASE, and B-Trieve) have supported the indexed sequential access method (ISAM) type of data access. However, these systems have supported different kinds of APIs.

Server-based database systems (such as InterBase, Sybase, Oracle, and DB2) have supported the ANSI standard SQL language. However, an industry standard for an API is just emerging: X/Open SQL Call Level Interface (CLI). This standard addresses only SQL-based database needs, and does not fully address ISAM type data source requirements.

Unified access

BDE functions unify access to both PC-based or ISAM databases and server-based SQL databases with a consistent cursor-based API. BDE supports the basic APIs for both types of databases, extending powerful features of each type to the other. For example, BDE's navigational features are influenced by ISAM databases, and are extended to support server-based databases. Similarly, the Query portion of BDE is influenced by the SQL standard, and is extended to support ISAM databases. Support of these basic API features on both kinds of databases makes BDE unique. For example, Paradox and dBASE exploit these features to support transparent access to SQL data sources.

Through each driver, BDE gives the application developer access to the unique features of each database system, such as data types, primary indexes for Paradox tables, delete flags and expression indexes for dBASE tables, and special processing for SQL databases. For this reason, BDE functions are not a least-common-denominator API.

Purposes

For all supported databases for which a BDE native driver or an ODBC driver is available, BDE API function calls serve the following purposes:

Opening and closing of databases

Getting and setting properties of BDE objects: system, clients, sessions, drivers, databases, cursors, and statements

Accessing and manipulating data stored in each database system

Defining the structure of a database in each database system, such as creating tables and indexes

Performing operations across database systems, such as copying and joining tables