bBaseW Table Header

with dBase and xBase for comparison

Byte
Number
bBaseW dBase 7 dBase III to 5
xBase
Contains Description Contains Description Contains Description
00 BYTE†1 NondBase/xBase§1 (0xFF) BYTE Version Number§2 BYTE Version Number§3
01 BYTE Little Endian§1 (0xFE) BYTE Update decade.§4 BYTE Update decade.§4
02 WORD†2 bBaseW Version Number§1 BYTE Update month§4 BYTE Update month.§4
03 BYTE Update day of month.§4 BYTE Update day of month.§4
04 LONG†4 Header size. (Includes sum of sizes of Field Descriptors.) LONG Number of records. LONG Number Of Records
05
06
07
08 QUAD†5 Number Of Records
(limits§5)
WORD Length Of Header WORD Length
Of Header
09
10 WORD Record Length WORD Record
Length
11
12 2 BYTEs reserved 2 bytes reserved
13
14 1 BYTE dB IV Incomplete transaction§6 1 BYTE Incomplete
transaction§6
15 1 BYTE dB IV encyrption flag§7 1 BYTE encyption flag§7
16 QUAD Time of last update.
UTC/GMT/ZULU
In Windows FileTime
12 BYTEs reserved multi-user processing§8 DWORD Free record
thread
LAN only. §9
17
18
19
20 8 BYTEs multi-user§8
21
22
23
24 LONG Record Length. Sum of field lengths.
25
26
27
28 DWORD†3 32 Flag bits.
(see table below)
BYTE Production MDX flag; 0x01 if a production .MDX file exists for this table;
0x00 if no .MDX file exists.
BYTE MDX flag
dB IV
29 BYTE Language ID. BYTE Language ID
30 WORD Reserved (zero filled) WORD (reserved)
31
32 32
UTF-16†6
characters
(64 BYTEs)
Table Name
31 characters plus NULL
32 byte
ASCII
string
Language Driver Name
as with byte 29 is now redundent
with UTF-16 for data.
Language DLLs for programs controls.
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66

~
89
90
91
92
93
94
95
96 16 BYTEs reserved "just in case"
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
†1 BYTE is 8 bit, unsigned.
†2 WORD is 16 bit, unsigned, BYTEs little endian.
†3 DWORD is 32 bit, unsigned, BYTEs little endian.
†4 LONG is 32 bit, signed, BYTEs little endian.
†5 QUAD is 64 bit, signed, BYTEs little endian.
†6 UTF-16 below 0xE000 (at 0xE000 and above UTF-16 becomes 32 bit).

§1 bBaseW version number -
        Byte 0 = 0xFF Is dual purpose to avoid conflick with dBase, FoxPro, etc. and 1st byte of BOM.
        Byte 1 = 0xFE Is 2nd of little endian BOM.
        Bytes 2 and 3 are bBaseW version.
§2 dBase 7 Version Number -
        Valid dBASE for Windows table file, bits 0-2 indicate version number: 3 for dBASE Level 5, 4 for dBASE Level 7.
§3 dBase III-5/xBase Version Number -
        0-20-2 Version no. i.e. 0-7
        3 Presence of memo file
        4-6 Presence of SQL table
        7 DBT flag
        A couple values used by Clipper and FoxPro.
§4 Date of last update; in YYMMDD format.
       ●Each byte contains the number in binary.
        YY is added to a base of 190010 to determine the actual year.
        MM is the month number.
        DD is the day of the month.
       ●IMO without time to fractions of seconds "Date of last update" was a ludicrous waste of effort! See "Time of last
        update." at bBaseW byte 16.
§5 Number Of Records Limits -
       ●In 32 bit environment and entire table loaded into an array the number of records is limitd to maximum index
        of 2.147*10^9, (LONG) and further reduced by memory constraints.
       ●Working "in file" in 32 bit, or any method in 64 bit, allows more than 2.147*10^9. The maximum 9.223*10^18 of
        a QUAD can not be attained due to file system limits.
§6 Incomplete Transaction -
§7 Encryption Flag -
       ●A BYTE used for a single bit flag, and is too far in header. For more security header should be encrypted as well.
        Perhaps make bBaseW version number a signed integer and the additive inverse marks table as encrypted; or add
        an "e" to the file extension (.dbfe).
§8 Multi-user processing -
       ●Multi-user is not part of the data table. bBaseW single user programs will use operating system file locking. Multi-
        user "server" programs will file lock and use record locking to prevent simultaneous editing of same record.
§9 Free record thread for LAN -
       ●Is not part of the table, nor described anywhere I can find.

Bit
Number
UDT/STRU
Member
Name
Flag Bit
Description
0 .Incmp Incomplete Transaction
1 .Flg2 .Flgx are temporary member
names till the bit is assigned.
2 .Flg3
3 .Flg4
4 .Flg5
5 .Flg6
6 .Flg7
7 .Flg8
8 .Flg9
9 .Flg10
10 .Flg11
11 .Flg12
12 .Flg13
13 .Flg14
14 .Flg15
15 .Flg16
16 .Flg17
17 .Flg18
18 .Flg19
19 .Flg20
20 .Flg21
21 .Flg22
22 .Flg23
23 .Flg24
24 .Flg25
25 .Flg26
26 .Flg27
27 .Flg28
28 .Flg29
29 .Flg30
30 .Flg31
31 .Flg32
Language ID Was always ignorant. (1 byte to ID two byte code page. Now use UNicode)

Created on 06 August 2023

1.92̅4̅ = ¤¸¤