|
The Btrieve API is single-function in that most program actions are determined by an operation code parameter, rather than a function name. You should choose the API for your application based on whether you are most interested in cross-platform portability of code or the best possible performance on a particular platform.
Your Btrieve application should never perform any standard I/O against a data file. Your application should perform all file I/O using a Btrieve API function.
Following are the Btrieve API functions.
To find the language-specific syntax required when calling a Btrieve API function, refer to the following section in Pervasive PSQL Programmer's Guide: Btrieve API Programming .
BTRV allows an application to make calls to the transactional interface. All the language interface modules provided with the Programming Interfaces installation option support the BTRV function. In some cases, the BTRV function actually calls the BTRCALL function. However, BTRV is the preferred function because of the platform independence it provides.
BTRVID allows an application to make a single transactional interface call that contains a clientID parameter, which the application can control. An application can use BTRVID to assign itself more than one client identity to the transactional interface and to execute operations for one client without affecting the state of the other clients. For more information, refer to Client ID.
In some cases, the BTRVID function actually calls another function. In 16-bit applications, it calls the BTRCALLID function. In 32-bit applications, it calls the BTRCALLID32 function (OS/2) or the BTRCALLID function (Windows NT/9X/ME). However, in both cases, BTRVID is the preferred function because of the platform independence it provides.
In DOS applications, you must load the DOS Requester with the appropriate /T value. Set /T to equal the number of client IDs you use in the application. For more information about the DOS Requester, refer to Pervasive's Getting Started With Pervasive PSQL manual.
For Windows NT and Windows 9X/ME, the BTRCALL function is a 32-bit function. You should use the BTRV function instead of BTRCALL unless you cannot afford the slight performance decrease that occurs with BTRV.
The BTRCALL32 function is the same as BTRCALL function, except that BTRCALL32 is a 32-bit function.
Use the BTRCALLID function if you need client-level control and your application operates only in the Windows NT and Windows 9X/ME environments.
This function is similar to the BTRVID function, except that it does not call an intermediate function. For Windows NT and Windows 9X/ME, BTRCALLID is a 32-bit function.
The BTRCALLID32 function is the same as the BTRCALLID function, except that the BTRCALLID32 is a 32-bit function.
The following historical functions are supported to maintain compatibility with applications written for previous Btrieve API releases:
While these functions are now obsolete, older applications that call these functions will still run with 6.15 and later MicroKernels.
|
Chapter contents
Prev topic: Introduction to Btrieve APIs
|