BUG: Invalid ALTER TABLE Command Works and Corrupts DBC (194515)
The information in this article applies to:
- Microsoft Visual FoxPro for Windows 3.0
- Microsoft Visual FoxPro for Windows 3.0b
- Microsoft Visual FoxPro for Windows 5.0
- Microsoft Visual FoxPro for Windows 5.0a
- Microsoft Visual FoxPro for Windows 6.0
This article was previously published under Q194515 SYMPTOMS
After issuing an invalid ALTER TABLE statement, running VALIDATE DATABASE
fails and returns an error.
RESOLUTION
To avoid creating an invalid object through the ALTER TABLE command, be
sure to include an expression in the Add Foreign Key statement.
To remove the invalid object reference in the database, follow the steps
listed below:
- Note the object number in the error below: it is Object #14.
- Use the database as a table.
- Delete the record for Object #14 (if that is the object number in the
error)
- Pack the database.
Fix Code For "Steps To Reproduce" Sample
CLOSE DATABASE ALL
USE testdb.DBC
DELETE FOR objectid=14 &&Delete object #14's record
PACK
USE
STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed
at the beginning of this article.
REFERENCES
For more information about the Alter Table command, search for "ALTER
TABLE" in the Visual FoxPro Help file.
For additional information, please see the following articles in the
Microsoft Knowledge Base:
186242 BUG: ALTER TABLE Cannot Create a Descending Primary Key
191697 BUG: ALTER TABLE Command With Multiple Drop Statements Fails
191593 BUG: ALTER TABLE Causes Memo File is Missing or Invalid Err
Modification Type: | Major | Last Reviewed: | 5/12/2003 |
---|
Keywords: | kbbug KB194515 |
---|
|