通过读取初始 .DBF 字节可以采用哪种标头格式?

发布于 2024-09-12 04:35:09 字数 1324 浏览 2 评论 0原文

关于.DBF文件的第一个字节以及如何检测所使用的xbase版本(即文件其余部分的格式),我可以编译的最全面的列表是:

Byte 0
-----------
x xxx x 001 = 0x?1 not used
0 000 0 010 = 0x02 FoxBASE
0 000 0 011 = 0x03 FoxBASE+/dBASE III PLUS, no memo
x xxx x 100 = 0x?4 dBASE 7
0 000 0 101 = 0x05 dBASE 5, no memo
0 011 0 000 = 0x30 Visual FoxPro
0 011 0 001 = 0x31 Visual FoxPro, autoincrement enabled
0 011 0 010 = 0x32 Visual FoxPro, Varchar, Varbinary, or Blob-enabled
0 100 0 011 = 0x43 dBASE IV SQL table files, no memo
0 110 0 011 = 0x63 dBASE IV SQL system files, no memo
0 111 1 011 = 0x7B dBASE IV, with memo
1 000 0 011 = 0x83 FoxBASE+/dBASE III PLUS, with memo
1 000 1 011 = 0x8B dBASE IV, with memo
1 000 1 110 = 0x8E dBASE IV with SQL table
1 100 1 011 = 0xCB dBASE IV SQL table files, with memo
1 110 0 101 = 0xE5 Clipper SIX driver, with SMT memo
1 111 0 101 = 0xF5 FoxPro 2.x (or earlier) with memo
1 111 1 011 = 0xFB FoxBASE (with memo?)
| ||| | |||
| ||| | |||   Bit flags (not used in all formats)
| ||| | |||   -----------------------------------
| ||| | +++-- bits 2, 1, 0, version (x03 = level 5, x04 = level 7)
| ||| +------ bit 3, presence of memo file
| +++-------- bits 6, 5, 4, presence of dBASE IV SQL table
+------------ bit 7, presence of .DBT file

通过读取初始文件可以假定哪种头格式.DBF字节? (即,该文件是否使用版本 2 标头、版本 3 到 5 标头或版本 7 标头?)根本不清楚最佳逻辑是什么......

Regarding the first byte of a .DBF file and how to detect the version of xbase used (ie, the format of the rest of the file), the most comprehensive list I can compile is:

Byte 0
-----------
x xxx x 001 = 0x?1 not used
0 000 0 010 = 0x02 FoxBASE
0 000 0 011 = 0x03 FoxBASE+/dBASE III PLUS, no memo
x xxx x 100 = 0x?4 dBASE 7
0 000 0 101 = 0x05 dBASE 5, no memo
0 011 0 000 = 0x30 Visual FoxPro
0 011 0 001 = 0x31 Visual FoxPro, autoincrement enabled
0 011 0 010 = 0x32 Visual FoxPro, Varchar, Varbinary, or Blob-enabled
0 100 0 011 = 0x43 dBASE IV SQL table files, no memo
0 110 0 011 = 0x63 dBASE IV SQL system files, no memo
0 111 1 011 = 0x7B dBASE IV, with memo
1 000 0 011 = 0x83 FoxBASE+/dBASE III PLUS, with memo
1 000 1 011 = 0x8B dBASE IV, with memo
1 000 1 110 = 0x8E dBASE IV with SQL table
1 100 1 011 = 0xCB dBASE IV SQL table files, with memo
1 110 0 101 = 0xE5 Clipper SIX driver, with SMT memo
1 111 0 101 = 0xF5 FoxPro 2.x (or earlier) with memo
1 111 1 011 = 0xFB FoxBASE (with memo?)
| ||| | |||
| ||| | |||   Bit flags (not used in all formats)
| ||| | |||   -----------------------------------
| ||| | +++-- bits 2, 1, 0, version (x03 = level 5, x04 = level 7)
| ||| +------ bit 3, presence of memo file
| +++-------- bits 6, 5, 4, presence of dBASE IV SQL table
+------------ bit 7, presence of .DBT file

Which header format can be assumed by reading the initial .DBF byte? (Ie, does the file use a version 2 header, a version 3 to 5 header, or a version 7 header?) It's not at all clear what the best logic would be...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

请持续率性 2024-09-19 04:35:09

DBF 标头: http://www.dbf2002.com/ dbf-file-format.html

从基本访问示例 dbf,是 BASIC ;)

http://www.angelfire.com/d20/quickbasic/UTIL/IMB9006.ZIP

  • 更多...

DBF 的标头实际上是静态的。
静态直到同一标题中指示的字段的开始部分。
不同的数据库引擎衍生品 (xbase) 给出的它们之间的差异在于数据类型、优化或存储格式(7.8 位 ASCII 或 128 或任何其他差异...)。
该格式没有版本(不是标准),只是作为在其引擎数据库上创建变体的软件开发人员进行的修订(dbase Foxpro vs vs Clipper 等...)

我对半自动翻译表示歉意,但很有用。

DBF Header: http://www.dbf2002.com/dbf-file-format.html

Example dbf access from basic, Yes BASIC ;)

http://www.angelfire.com/d20/quickbasic/UTIL/IMB9006.ZIP

  • more...

The DBF's are virtually static in its header.
Static until the start section of fields indicated in the same heading.
The difference made ​​between them given by different database engines derivatives (xbase) is the data types, optimization or storage formats (7.8 bits ASCII or 128 or any other difference ...).
The format does not have versions (not a standard) simply revisions as software developers who created variants on their engines database (dbase foxpro vs vs clipper etc ...)

I apologize for the semi-automatic translation, but useful.

七婞 2024-09-19 04:35:09

使用与读取的字节一致的格式;即 43637b、... 将是 dBase 4 标头,而 303132 将是 FoxPro 标头,依此类推。

正如您从到目前为止的表格中看到的,有点混乱。

Use the format that goes with the byte read; i.e. 43, 63, 7b, ..., would be dBase 4 headers, and 30, 31, and 32 would be FoxPro headers, and so forth.

As you can see from your table so far, it's a bit of a mess.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文