What FoxPro Checks When Opening a .DBF File

Last reviewed: July 5, 1995
Article ID: Q119763
The information in this article applies to:
  • Microsoft FoxPro for Windows, versions 2.5x, 2.6, 2.6a
  • Microsoft FoxPro for MS-DOS, versions 2.0, 2.5x, 2.6, 2.6a
  • Microsoft FoxPro for Macintosh, versions 2.5x

SUMMARY

When FoxPro attempts to open a .DBF file, it checks certain aspects of that file. If the file appears to be in the expected format, the attempt to open the file will succeed. If a problem is detected with the file, FoxPro returns an error message. This article explains what tests are performed when FoxPro attempts to open a .DBF file.

MORE INFORMATION

When FoxPro attempts to open a .DBF file, it tests the following items:

  • Record length

    The record length must not be <= 1. The record length must not exceed the maximum record length.

  • Fields

    The .DBF file must have at least one field.

  • Number of fields

    The number of fields must not be greater than the maximum allowable number of fields.

  • Number of records

    The number of records cannot be less than zero.

  • MS-DOS file size and data

    The start of data plus the number of records multiplied by the record length must not exceed the file size reported by MS-DOS.

If any of these tests fail, FoxPro will return an error message and will not allow the file to be opened.


Additional reference words: FoxMac FoxDos FoxWin 2.50 2.50a 2.50b 2.50c
2.60 2.60a
KBCategory: kbother
KBSubcategory: FxotherGeneral


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: July 5, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.