FoxPro Header Check to Determine if Database Is Corrupt

ID: Q110968

2.50 2.50a 2.50b 2.60 3.00| 2.50 2.50a 2.50b 2.60 | 2.50b

WINDOWS                   | MS-DOS                | MACINTOSH
kbprg

The information in this article applies to:

When opening a database file (.DBF), FoxPro checks the header for the following five conditions that indicate corruption:

1. Is the record length invalid?

    - Record length <= 1
    - Record length > maximum record length

2. Are there no fields?

3. Are there more fields than permitted?

4. Is the number of records < 0?

5. Is the file size invalid?

    - (Start-of-data + the # of records) * rec. length > file size

       NOTE: Start-of-data is where the first byte of the first
       record begins.

Additional reference words: VFoxWin 3.00 FoxMac FoxDos FoxWin 2.50 2.50a 2.50b table 2.60 KBCategory: kbprg KBSubcategory: FxprgGeneral
Keywords          : FxprgGeneral 
Version           : 2.50 2.50a 2.50b 2.60 3.00| 2.50
Platform          : MACINTOSH MS-DOS WINDOWS

Last Reviewed: May 1, 1996