📄 dbase.htm
字号:
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=gb2312">
<title>new page 1</title>
<meta name="generator" content="microsoft frontpage 3.0">
</head>
<body background="../jpg/di1.JPG">
<p align="center"><font size="6" color="#0000ff">dbase flie format</font></p>
<div align="center"><center>
<table border="0">
<tr>
<td width="100%">----------------------------------------------------------------------------<br>
genaral format of .dbf files in xbase languages 18-nov-96<br>
----------------------------------------------------------------------------<br>
applies for / supported by:<br>
<br>
fs = flagship d3 = dbaseiii+<br>
fb = foxbase d4 = dbaseiv<br>
fp = foxpro d5 = dbasev<br>
cl = clipper<br>
<br>
<br>
1. dbf structure<br>
================<br>
<br>
byte description<br>
------+--------------------------------------<br>
0..n .dbf header (see 2 for size, byte 8)<br>
n+1 1st record of fixed length (see 2&3) \<br>
2nd record (see 2 for size, byte 10) \ if dbf is<br>
... / not empty<br>
last record /<br>
last optional: 0x1a (eof byte)<br>
<br>
<br>
2. dbf header (variable size, depending on field count)<br>
=======================================================<br>
<br>
byte size contents description applies for (supported by)<br>
----+----+--------+----------------------------+-----------------------------<br>
00 1 0x03 plain .dbf fs, d3, d4, d5, fb, fp, cl<br>
0x04 plain .dbf d4, d5 (fs)<br>
0x05 plain .dbf d5, fp (fs)<br>
0x43 with .dbv memo var size fs<br>
0xb3 with .dbv and .dbt memo fs<br>
0x83 with .dbt memo fs, d3, d4, d5, fb, fp, cl<br>
0x8b with .dbt memo in d4 format d4, d5<br>
0x8e with sql table d4, d5<br>
0xf5 with .fmp memo fp<br>
01 3 yymmdd last update digits all<br>
04 4 ulong number of records in file all<br>
08 2 ushort header size in bytes all<br>
10 2 ushort record size in bytes all<br>
12 2 0,0 reserved all<br>
14 1 0x01 begin transaction d4, d5<br>
0x00 end transaction d4, d5<br>
0x00 ignored fs, d3, fb, fp, cl<br>
15 1 0x01 encryptpted d4, d5<br>
0x00 normal visible all<br>
16 12 0 (1) multi-user environment use d4,d5<br>
28 1 0x01 production index exists fp, d4, d5<br>
0x00 index upon demand all<br>
29 1 n language driver id d4, d5<br>
0x01 codepage 437 dos usa fp<br>
0x02 codepage 850 dos multi ling fp<br>
0x03 codepage 1251 windows ansi fp<br>
0xc8 codepage 1250 windows ee fp<br>
0x00 ignored fs, d3, fb, fp, cl<br>
30 2 0,0 reserved all<br>
32 n*32 field descriptor, see (2a) all<br>
+1 1 0x0d header record terminator all<br>
<br>
<br>
2a. field descriptor array in dbf header (fix 32 bytes for each field)<br>
========================================<br>
<br>
byte size contents description applies for (supported by)<br>
----+----+--------+----------------------------+-----------------------------<br>
0 11 asci field name, 0x00 termin. all<br>
11 1 asci field type (see 2b) all<br>
12 4 n,n,n,n fld address in memory d3<br>
n,n,0,0 offset from record begin fp<br>
0,0,0,0 ignored fs, d4, d5, fb, cl<br>
16 1 byte field length, bin (see 2b) all \ fs,cl: for c field type,<br>
17 1 byte decimal count, bin all / both used for fld lng<br>
18 2 0,0 reserved all<br>
20 1 byte work area id d4, d5<br>
0x00 unused fs, d3, fb, fp, cl<br>
21 2 n,n multi-user dbase d3, d4, d5<br>
0,0 ignored fs, fb, fp, cl<br>
23 1 0x01 set fields d3, d4, d5<br>
0x00 ignored fs, fb, fp, cl<br>
24 7 0..0 reserved all<br>
31 1 0x01 field is in .mdx index d4, d5<br>
0x00 ignored fs, d3, fb, fp, cl<br>
<br>
<br>
2b. field type and size in dbf header, field descriptor (1 byte)<br>
=======================================================<br>
<br>
size type description/storage applies for (supported by)<br>
------+---------+------------------------------+-----------------------------<br>
c 1..n char ascii (oem code page chars) all<br>
rest= space, not \0 term.<br>
n = 1..64kb (using deci count) fs<br>
n = 1..32kb (using deci count) fp, cl<br>
n = 1..254 all<br>
d 8 date 8 ascii digits (0..9) in the all<br>
yyyymmdd format<br>
f 1..n numeric ascii digits (-.0123456789) fs, d4, d5, fp<br>
variable pos. of float.point<br>
n = 1..20<br>
n 1..n numeric ascii digits (-.0123456789) all<br>
fix posit/no float.point<br>
n = 1..20 fs, fp, cl<br>
n = 1..18 d3, d4, d5, fb<br>
l 1 logical ascii chars (yynnttff space) fs, d3, fb, fp, cl<br>
ascii chars (yynnttff ?) d4, d5 (fs)<br>
m 10 memo 10 digits repres. the start all<br>
block posit. in .dbt file, or<br>
10spaces if no entry in memo<br>
v 10 variable variable, bin/asc data in .dbv fs<br>
4bytes bin= start pos in memo<br>
4bytes bin= block size<br>
1byte = subtype<br>
1byte = reserved (0x1a)<br>
10spaces if no entry in .dbv<br>
p 10 picture binary data in .ftp fp<br>
structure like m<br>
b 10 binary binary data in .dbt d5<br>
structure like m<br>
g 10 general ole objects d5, fp<br>
structure like m<br>
2 2 short int binary int max +/- 32767 fs<br>
4 4 long int binary int max +/- 2147483647 fs<br>
8 8 double binary signed double ieee fs<br>
<br>
<br>
3. each dbf record (fix length)<br>
==================<br>
<br>
byte size description applies for (supported by)<br>
------+----+--------------------------------------+--------------------------<br>
0 1 deleted flag "*" or not deleted " " all<br>
1..n 1.. x-times contents of fields, fixed all<br>
length, unterminated.<br>
for n, see (2) byte 10..11<br>
<br>
---<br>
multisoft datentechnik gmbh<br>
<br>
</td>
</tr>
</table>
</center></div>
<p align="center"><a href="../index.htm">返回</a></p>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -