Microsoft KB Archive/110968

From BetaArchive Wiki
Knowledge Base


INFO: FoxPro Header Check to Determine if Table is Corrupt

Article ID: 110968

Article Last Modified on 2/22/2005



APPLIES TO

  • Microsoft Visual FoxPro 3.0 Standard Edition
  • Microsoft FoxPro 2.5b
  • Microsoft FoxPro 2.5a
  • Microsoft FoxPro 2.5b
  • Microsoft FoxPro 2.6 Standard Edition
  • Microsoft FoxPro 2.5b for MS-DOS
  • Microsoft FoxPro 2.5a
  • Microsoft FoxPro 2.5b for MS-DOS
  • Microsoft FoxPro 2.6 for MS-DOS
  • Microsoft FoxPro 2.5b for Macintosh



This article was previously published under Q110968

SUMMARY

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

  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.


Keywords: kbinfo KB110968