The information in this article applies to:
SUMMARY
When FoxPro returns the error message "Not a Database File," you can
sometimes correct the damaged file's header by using a hexadecimal file
editor.
MORE INFORMATION
The "Not a database file" error message in FoxPro 2.x may be caused by a
record count value in the table header that is greater than the actual
number of records. The Hexedit.app, distributed with Visual FoxPro 5.0 may
be used in an attempt to correct the record count. In the Hexedit.app, a
hexadecimal representation of the record count may be found at Address:
0000000 in columns 4, 5, 6, and 7. Use the calculator in Windows 95 or
Windows NT to convert from decimal to hexadecimal and remember to reverse
the order of the numbers as per this article.
Q135905 How to Retrieve Records that were Previously Zapped Q139758 How to Modify the Table Header from FoxPro********************************************************************** WARNING: ANY USE BY YOU OF THE INFORMATION PROVIDED IN THIS ARTICLE IS AT YOUR OWN RISK. Microsoft provides this information "as is" without warranty of any kind, either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose. ********************************************************************** The table below identifies the bytes in the first part of the header:
The second part of the header depends on the number of fields in the
database. Each field uses 32 bytes. There is also a single terminating
byte (0Dh) at the very end.
The field definition is as follows:
FoxPro limits field names to ten characters; thus the eleventh byte, or the
last (rightmost) byte, after the field name, must be null (00h). The field
length is dependent upon the data type. Character fields use the
seventeenth and eighteenth bytes, in reverse format.
Memo, date, and logical fields, which have fixed lengths of 10, 8, and 1, respectively, need only the first byte (17). The remaining bytes are generally nulls. However, keep in mind that there is a terminating byte of 0Dh at the very end of the header. After the terminating 0Dh byte, the actual database data begins. The first byte of each record is the deletion flag. If the record has been deleted, but not packed, this byte will be 2Ah (an ASCII asterisk); otherwise, it is 20h (an ASCII space). For DBF files created in Visual FoxPro for Windows, or 2.x DBF files added to a Database Container (DBC), the backlink information is stored between byte 0DH and the beginning of the data. REFERENCES
"FoxPro Version 2 Programming Guide," Chapter 11, by Michael Antonovich Additional query words: VFoxWin FoxDos FoxWin 2.50 2.50a errmsg err msg repair corrupt not a table/dbf 2.50b
Keywords : kberrmsg FxinteropDbase |
Last Reviewed: July 27, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |