To: webmaster@wotsit.demon.co.uk
From:	Peter Mikalajunas
Corrected by P.Oliver 26/5/98

Your DBF description is iffy to say the least.  I am enclosing
a more accurate file layout. Note it include dBaseIII+, dBaseIV,
FoxBase, FoxPro upto and including 2.6.


DBF FILE STRUCTURE
~~~~~~~~~~~~~~~~~~

BYTES   DESCRIPTION
00	FoxBase+, FoxPro, dBaseIII+, dBaseIV, no memo - 0x03
        FoxBase+, dBaseIII+ with memo - 0x83
	FoxPro with memo - 0xF5
	dBaseIV with memo - 0x8B
	dBaseIV with SQL Table - 0x8E

01-03   Last update, format YYYYMMDD   **correction: it is YYMMDD**
04-07	Number of records in file (32-bit number)
08-09	Number of bytes in header (16-bit number)
10-11	Number of bytes in record (16-bit number)
12-13	Reserved, fill with 0x00
14	dBaseIV flag, incomplete transaction
        Begin Transaction sets it to 0x01
	End Transaction or RollBack reset it to 0x00

15      Encryption flag, encrypted 0x01 else 0x00
        Changing the flag does not encrypt or decrypt the records

16-27   dBaseIV multi-user environment use
28	Production index exists - 0x01 else 0x00
29	dBaseIV language driver ID
30-31   Reserved fill with 0x00
32-n	Field Descriptor array
n+1	Header Record Terminator - 0x0D

FIELD DESCRIPTOR ARRAY TABLE
BYTES   DESCRIPTION
0-10    Field Name ASCII padded with 0x00
11	Field Type Identifier (see table)
12-15	Displacement of field in record
16	Field length in bytes
17	Field decimal places
18-19	Reserved
20	dBaseIV work area ID
21-30	Reserved
31 	Field is part of production index - 0x01 else 0x00

FIELD IDENTIFIER TABLE
ASCII   DESCRIPTION
C       Character
D       Date, format YYYYMMDD
F       Floating Point
G       General - FoxPro addition
L       Logical, T:t,F:f,Y:y,N:n,?-not initialized
M       Memo (stored as 10 digits representing the dbt block number)
N       Numeric
P       Picture - FoxPro addition

Note all dbf field records begin with a deleted flag field.
If record is deleted - 0x2A (asterisk) else 0x20 (space)
End of file is marked with 0x1A


Peter Mikalajunas
kd9fb@xnet.com
http://www.xnet.com/~kd9fb