Language | Compiler | Source Module |
---|---|---|
C/C++ | • Most C/C++ compilers, including Embarcadero, Microsoft, and WATCOM. This interface provides multiple platform support. • Embarcadero C++ Builder | • BlobHdr.h (for Extended DOS platforms using Embarcadero or Phar Lap only) • BtiTypes.h (platform-independent data types) • BtrApi.h (Btrieve function prototypes) • BtrApi.c (MicroKernel Engine code for all platforms) • BtrConst.h (common Btrieve constants) • BtrSamp.c (sample program) • Btrvexid.h (entry point declarations) • CBBtrv.cpp • CBBtrv.mak • CBBMain.cpp • CBBMain.dfm • CBBMain.h |
Delphi | • Embarcadero Delphi 1 • Embarcadero Delphi 3 and above | • BtrConst.pas (common Btrieve constants) • Btr32.dpr • Btr32.dof • BtrSam32.dfm • BtrSam32.pas (sample program) • BtrApi32.pas • BtrConst.pas (common Btrieve constants) |
Pascal | • Borland Turbo Pascal 5 – 6 • Borland Pascal 7 for DOS • Extended DOS Pascal for Turbo Pascal 7 • Borland Turbo Pascal 1.5 • Borland Pascal 7 for Windows | • BtrApid.pas • BtrSampd.pas (sample program) • BtrConst.pas (common Btrieve constants) • BlobHdr.pas • BtrApiw.pas • BtrSampw.pas (sample program) |
Visual Basic | • Microsoft Visual Basic for Windows NT and Windows 9X | • BtSamp32.vbp • BtrSam32.bas (sample program) • BtrFrm32.frm |
Assembly | C | COBOL | Delphi | Pascal | Visual Basic |
---|---|---|---|---|---|
quadword | long long1 | — | — | — | — |
doubleword | long1 | PIC 9(4) | longint1 | longint1 | Long integer |
word | short int1 | PIC 9(2) | smallint1 | integer1 | Integer |
byte | char | PIC X | char | char | String |
byte | unsigned char | PIC X | byte | byte | Byte |
1The value of integers depends on the environment in which you develop. In 32-bit environments, integers are the same as long integers. In 16-bit environments, integers are the same as short, or small, integers. |
Operating System | Application Type | Switch |
---|---|---|
DOS | 16-bit 32-bit with Tenberry Extender and BStub.exe 32-bit with Phar Lap 6 32-bit with Embarcadero PowerPack | BTI_DOS BTI_DOS_32R BTI_DOS_32P BTI_DOS_32B |
Linux | 32-bit | BTI_LINUX |
Linux | 64-bit | BTI_LINUX_64 |
macOS | 64-bit | BTI_MACOSX_64 |
Win32 | 32-bit Windows | BTI_WIN_32 |
Win64 | 64-bit Windows | BTI_WIN_64 |
Operating System | Application Type | Switch |
---|---|---|
DOS | 16-bit 32-bit with Tenberry Extender and BStub.exe1 32-bit with Phar Lap 6 32-bit with Embarcadero PowerPack | BTI_DOS BTI_DOS_32R BTI_DOS_32P BTI_DOS_32B |
Visual Basic Type | Type Constant | Typical Size (in bytes) | Boundary |
---|---|---|---|
Byte | FLD_BYTE | Any | 1 byte (none) |
String | FLD_STRING | Any | 1 byte (none) |
Boolean | FLD_LOGICAL | 2 | 2 bytes |
Integer | FLD_INTEGER | 2 | 2 bytes |
Currency | FLD_MONEY | 4 | 4 bytes |
Long | FLD_INTEGER | 4 | 4 bytes |
Single | FLD_IEEE | 4 | 4 bytes |
Double | FLD_IEEE | 8 | 4 bytes |
Function | Purpose | Location | Parameters | Returns |
---|---|---|---|---|
BTRCALL | To perform Btrieve operations | BTRAPI.BAS | • OP As Integer The Btrieve operation number as listed in the Btrieve API Guide. • Pb$ As String Stores the position block in a string used to retrieve or store records or to pass structures to Btrieve. • Db As Any Data buffer. This parameter is used to retrieve or store records or to pass structures to Btrieve. • DL As Long Length of data buffer. • Kb As Any Key buffer. • Kl As Integer Length of key buffer. • Kn As Integer Key number. | Integer The Btrieve status code returned by the operation. See Status Codes and Messages for more information about a specific code. |
RowToStruct | Converts a row of bytes into a Visual Base UDT. | PALN32.DLL | • row (1 to n) As Byte Input array to retrieve packed data. • fld (1 to n) As FieldMap A FieldMap array used to determine data types of individual fields. • udt As Any The UDT to store the data. • udtSize As Long The size of the UDT. Generate this value using LenB( ). | Integer 0 if okay. Otherwise an error occurred. |
SetFieldMap | Sets the members of a FieldMap element. | PALN32.DLL | • map As FieldMap An element of a FieldMap array. • dataType As Integer The field type, passes on the following constants: - FLD_STRING - FLD_INTEGER - FLD_IEEE - FLD_MONEY - FLD_LOGICAL - FLD_BYTE - FLD_UNICODE1 • size As Long Size of the field, in bytes, as stored in the database. | Nothing |
SetFieldMap FromDDF | Sets all the members of an array of the FieldMap type. | PALN32.DLL | • path As String A full path name to the data source. • table As String Name of the table. • userName As String Reserved, pass a null string (e.g. " "). • passwd As String Reserved, pass a null string (e.g. " "). • map (1 to n) As FieldMap The destination FieldMap array to fill. It must contain the exact number of elements as the number of fields in the record. • unicode As Integer 0 if strings are stored in record as ASCII. Otherwise, they are stored as Unicode. | Integer 0 if okay. Otherwise, an error occurred. |
StructToRow | Converts a Visual Basic UDT to a row of bytes | PALN32.DLL | • row (1 to n) As Byte Output array to store packed data. • fld (1 to n) As FieldMap A FieldMap array used to determine data types of individual fields. • udt As Any The UDT from which to retrieve data. • udtSize As Long The size of the UDT. Generate this value using LenB( ). | Integer 0 if okay. Otherwise, an error occurred. |
1The field type FLD_UNICODE is used to specify a field of Visual Basic Type 'String' that is to be stored in UNICODE both within the database row (packed structure) as well as within the UDT (user-defined data type). If the field type FLD_STRING is used, it will be converted into the default ANSI code page character set of the system in the database row, although UNICODE will be used in the UDT (user-defined data type). In short, if you wish to store the string field in UNICODE in your database, choose field type FLD_UNICODE. If you wish to store the string field in the database in the default ANSI code page character set of the system, choose FLD_STRING. |