Microsoft KB Archive/130461

= New Header Structure for Tables in Visual FoxPro =

Article ID: 130461

Article Last Modified on 8/21/1999

-

APPLIES TO


 * Microsoft Visual FoxPro 3.0 Standard Edition

-



This article was previously published under Q130461



SUMMARY
Visual FoxPro now contains a new header structure for tables contained in a database container (.DBC files) and for free tables (.DBF files). The header record defines the structure of that table and contains any relevant information related to the table.

The number of bytes that make up FoxPro header structure has been increased to accommodate the tables that are now contained in a database (.DBC files). To add a FoxPro version 2.x table to a Visual FoxPro database, Visual FoxPro converts the header structure internally. If you need to use a table created in Visual FoxPro in FoxPro version 2.x, you must convert it back to the version 2.x format by using this command: COPY TO Type FOX2X



MORE INFORMATION
Here is the new header information. Basically the header was increased by 263 bytes to allow for the backlink to that DBC.

 The first byte (signature) has a 0x30 (hex or 48 decimal) in it for all tables created in Visual FoxPro.  The 29th byte contains flag bits with the following meaning:   0x01 - has production MDX (note that this is as in previous versions) 0x02 - has memos 0x04 - is a database container (DBC) Since a DBC also has memos and an index, the value for the 29th byte 28 is 07.  Immediately following the field definition are 263 bytes reserved for a backlink ending at the location described by bytes 9th and 10th in the header. This means that you should use these header bytes to determine the start of the data instead of trying to calculate the end of the dictionary.

