How to Trap for "Not a Database" Error in a Corrupt .DBCID: Q128078 3.00 WINDOWS The information in this article applies to:
SUMMARYIf a Database Container (.DBC file) becomes corrupted or damaged, it may generate error number 1552: File "<filename>" is not a database. This article shows by example how to trap for this error by using an ON ERROR routine.
MORE INFORMATIONTo demonstrate, perform the following steps: 1. Create a new database and call it DATA1.DBC 2. In the Database Designer, right-click and choose New Table. Create a new 3. Issue the following commands in the Command Window:
CAUTION: If you are using an existing file instead of the example file
created here, please back it up before proceeding to the next step.
4. Change the PARENTID in the first record to 0, then Save and Close the 5. Type the following into a program and run it:
The error message "Error #1552 Message:File C:\VFP\DATA1.DBC is not a
database." should be displayed in a Wait window.
Additional reference words: 3.00 trap error VFoxWin KBCategory: KBSubcategory: FxprgTable
|
Last Reviewed: May 22, 1998 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |