您当前的位置:首页>>技术中心>>数据恢复文章>>正文
 
dbase flie format
作者: 来源: 日期:2006-3-26 0:19:26  点击次数:

----------------------------------------------------------------------------
genaral format of .dbf files in xbase languages 18-nov-96
----------------------------------------------------------------------------
applies for / supported by:

fs = flagship d3 = dbaseiii+
fb = foxbase d4 = dbaseiv
fp = foxpro d5 = dbasev
cl = clipper


1. dbf structure
================

byte description
------+--------------------------------------
0..n .dbf header (see 2 for size, byte 8)
n+1 1st record of fixed length (see 2&3) \
2nd record (see 2 for size, byte 10) \ if dbf is
... / not empty
last record /
last optional: 0x1a (eof byte)


2. dbf header (variable size, depending on field count)
=======================================================

byte size contents description applies for (supported by)
----+----+--------+----------------------------+-----------------------------
00 1 0x03 plain .dbf fs, d3, d4, d5, fb, fp, cl
0x04 plain .dbf d4, d5 (fs)
0x05 plain .dbf d5, fp (fs)
0x43 with .dbv memo var size fs
0xb3 with .dbv and .dbt memo fs
0x83 with .dbt memo fs, d3, d4, d5, fb, fp, cl
0x8b with .dbt memo in d4 format d4, d5
0x8e with sql table d4, d5
0xf5 with .fmp memo fp
01 3 yymmdd last update digits all
04 4 ulong number of records in file all
08 2 ushort header size in bytes all
10 2 ushort record size in bytes all
12 2 0,0 reserved all
14 1 0x01 begin transaction d4, d5
0x00 end transaction d4, d5
0x00 ignored fs, d3, fb, fp, cl
15 1 0x01 encryptpted d4, d5
0x00 normal visible all
16 12 0 (1) multi-user environment use d4,d5
28 1 0x01 production index exists fp, d4, d5
0x00 index upon demand all
29 1 n language driver id d4, d5
0x01 codepage 437 dos usa fp
0x02 codepage 850 dos multi ling fp
0x03 codepage 1251 windows ansi fp
0xc8 codepage 1250 windows ee fp
0x00 ignored fs, d3, fb, fp, cl
30 2 0,0 reserved all
32 n*32 field descriptor, see (2a) all
+1 1 0x0d header record terminator all


2a. field descriptor array in dbf header (fix 32 bytes for each field)
========================================

byte size contents description applies for (supported by)
----+----+--------+----------------------------+-----------------------------
0 11 asci field name, 0x00 termin. all
11 1 asci field type (see 2b) all
12 4 n,n,n,n fld address in memory d3
n,n,0,0 offset from record begin fp
0,0,0,0 ignored fs, d4, d5, fb, cl
16 1 byte field length, bin (see 2b) all \ fs,cl: for c field type,
17 1 byte decimal count, bin all / both used for fld lng
18 2 0,0 reserved all
20 1 byte work area id d4, d5
0x00 unused fs, d3, fb, fp, cl
21 2 n,n multi-user dbase d3, d4, d5
0,0 ignored fs, fb, fp, cl
23 1 0x01 set fields d3, d4, d5
0x00 ignored fs, fb, fp, cl
24 7 0..0 reserved all
31 1 0x01 field is in .mdx index d4, d5
0x00 ignored fs, d3, fb, fp, cl


2b. field type and size in dbf header, field descriptor (1 byte)
=======================================================

size type description/storage applies for (supported by)
------+---------+------------------------------+-----------------------------
c 1..n char ascii (oem code page chars) all
rest= space, not \0 term.
n = 1..64kb (using deci count) fs
n = 1..32kb (using deci count) fp, cl
n = 1..254 all
d 8 date 8 ascii digits (0..9) in the all
yyyymmdd format
f 1..n numeric ascii digits (-.0123456789) fs, d4, d5, fp
variable pos. of float.point
n = 1..20
n 1..n numeric ascii digits (-.0123456789) all
fix posit/no float.point
n = 1..20 fs, fp, cl
n = 1..18 d3, d4, d5, fb
l 1 logical ascii chars (yynnttff space) fs, d3, fb, fp, cl
ascii chars (yynnttff ?) d4, d5 (fs)
m 10 memo 10 digits repres. the start all
block posit. in .dbt file, or
10spaces if no entry in memo
v 10 variable variable, bin/asc data in .dbv fs
4bytes bin= start pos in memo
4bytes bin= block size
1byte = subtype
1byte = reserved (0x1a)
10spaces if no entry in .dbv
p 10 picture binary data in .ftp fp
structure like m
b 10 binary binary data in .dbt d5
structure like m
g 10 general ole objects d5, fp
structure like m
2 2 short int binary int max +/- 32767 fs
4 4 long int binary int max +/- 2147483647 fs
8 8 double binary signed double ieee fs


3. each dbf record (fix length)
==================

byte size description applies for (supported by)
------+----+--------------------------------------+--------------------------
0 1 deleted flag "*" or not deleted " " all
1..n 1.. x-times contents of fields, fixed all
length, unterminated.
for n, see (2) byte 10..11

---
multisoft datentechnik gmbh


上一篇:SAN,NAS,DAS及其架构之间区别
下一篇:MDB 文件格式

  北京总部: 4006-505-646
  上 海 部: 021-58358765
  深 圳 部: 0755-83692929
  浙 江 部: 13666673722
  其它地区: 4006-505-646

经典案例
藁城市东街百货-EFS文件解密成
中央电视台新闻评论部-苹果分
promise乔鼎硬盘阵列数据恢复成
麒麟童文化-苹果分区无法打开,
NAS 8100服务器数据恢复成功 
Liteon-重建一组RAID时,不小
濮阳市地方税务局-CHKDSK后数据
北京市海淀区华夏心理培训学校
台湾HD公司-FreeBSD Nas无法启
NCR公司-硬盘数据恢复成功 
解决方案
硬盘出现异响应急处理
raid磁盘阵列OFFLINE后的应急方
磁盘未被格式化,是否格式化数据
误GHOST、误一键恢复灾难应急方
误删除、误格式化数据灾难应急
LINUX FSCK数据出错灾难应急方
北亚数据恢复 - 联系我们 - 关于北亚 - 友情链接 - 网站地图 - RSS聚合 
版权所有 北京北亚数据恢复中心
24小时免费咨询电话:4006-505-646 或 800-810-580
公司地址:北京市海淀区永丰基地丰慧中路7号新材料创业大厦B座205室
vicl