System Overview
Chapter Updated 04/28/23
Extension | Description | Supported by Xbase64 library? |
---|---|---|
*.DBF | Main DBF file or table name | |
*.DBT | Verson 3 or Version 4 memo file | |
*.NDX | Single tag index file | |
*.MDX | Multi tag index file | |
*.INF | ODBC file used for auto open of NDX files | |
*.NTX | Clipper indexfile | |
*.CDX | Fox Pro indexfile | |
*.IDX | Fox Pro index file |
Position | Length | Description |
---|---|---|
0 | 1 byte | file version number (03H without a .DBT file) (83H with a .DBT file) |
1-3 | 3 bytes | date of last update (YY MM DD) in binary format |
4-7 | 32 bit number | number of records in data file |
8-9 | 16 bit number | length of header structure |
10-11 | 16 bit number | length of the record |
12-31 | 20 bytes | reserved |
32-n | 32 bytes each | field descriptor record (see below) |
n+1 | 1 byte | 0DH as the field terminator |
Position | Length | Description |
---|---|---|
0-10 | 11 bytes | field name in ASCII zero-filled |
11 | 1 byte | field type in ASCII (C N L D or M) |
12-15 | 32 bit number | field data address |
16 | 1 byte | field length in binary |
17 | 1 byte | field decimal count in binary |
18-31 | 14 bytes | reserved bytes (version 1.00) |
DATA TYPE | DATA RECORD STORAGE |
---|---|
Character | ASCII characters, left justified, right blank filled |
Date | (8 digits in YYYYMMDD format, such as 19601007 for October 7, 1960) |
Logical | ? Y y N n T t F f (? when not initialized) |
Memo | 10 digits representing a .DBT block number |
Numeric | . 0 1 2 3 4 5 6 7 8 9 + -, right justified, left blank filled |
Float (Version IV only) | . 0 1 2 3 4 5 6 7 8 9 + -, right justified, left blank filled |
Valid Block Types |
---|
Head Block |
Only data block for memo field |
First of several contiguous data block set |
2-n of contiguous data block set |
Only data block in free chain (version IV only) |
First of several contiguous free block set (version IV only) |
2-n of contiguous free block set (type 4 only) |
1-4 | LONG | Next Block ID |
---|---|---|
5-8 | LONG | Not used all 0x00's |
9-16 | CHAR(8) | Filename (Version IV Only) |
17 | CHAR | Version (0x03 = Version III, 0x00 = Version IV) |
18-20 | CHAR(3) | Not used all 0x00's |
21-22 | SHORT | Block Size (Version IV only ) |
23-Remainder of block | CHAR | Not used |
xbShort | 0-1 | -1 |
---|---|---|
xbShort | 2-3 | Starting position of data (always 8 ?) |
xbLong | 4-7 | Length of data includes first 8 bytes |
char (9) - Blocksize | 8-15 | Data |
xbLong | 0-3 | Next free block in the free block chain |
---|---|---|
xbLong | 4-7 | Number of free blocks in this contiguous free block set |
Error Code | Description |
---|---|
EBADF | Invalid file descriptor |
EINVAL | Invalid lock information or file does not support locks |
EACCESS EAGAIN | Lock can not be set because it is blocked by an existing lock on the file. |
ENOLCK | The system is out of lock resources, too many file locks in place. |
EDEADLK | Deadlock condition |
EINTR | Process was interrupted by a signal while it was waiting |