Btrieve API Functions
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 Function
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 Function
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 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.
BTRCALL Function
For Windows and Linux, BTRCALL and BTRCALL32 are equivalent to the BTRV function. You should use the BTRV function instead of BTRCALL unless you cannot afford the slight performance decrease that occurs with BTRV.
BTRCALLID Function
Use the BTRCALLID function if you need client-level control and your application operates in Windows or Linux.
This function is similar to the BTRVID function, except that it does not call an intermediate function.
BTRCALLID32 Function
The BTRCALLID32 function is the same as the BTRCALLID function.
Obsolete Functions
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.