Microsoft KB Archive/191521

= FIX: DROP TABLE Case Sensitive if Table in Persistent Relation =

Article ID: 191521

Article Last Modified on 12/11/1999

-

APPLIES TO


 * Microsoft Visual FoxPro 5.0 Standard Edition
 * Microsoft Visual FoxPro 5.0a
 * Microsoft Visual FoxPro 6.0 Professional Edition

-



This article was previously published under Q191521



SYMPTOMS
If you attempt to issue a DROP TABLE command to remove a table from a Database Container (DBC), and the table is involved in a persistent relation in the DBC, the manner in which the DROP TABLE command is processed depends on the case of the table name passed to the command. If the table name is in mixed or lower case, the following error occurs:

Table test2 is referenced in a relation.

If the table name is in upper case, the table is deleted.



STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This bug has been corrected in Visual FoxPro 6.0.



MORE INFORMATION
Expected behavior is that the error is generated regardless of the case of the table name in the DROP TABLE command.

Steps to Reproduce Behavior
  Run the following code from a program (.prg) file: CLOSE DATA ALL CREATE DATABASE Testdb

CREATE TABLE Test2 (cField C(5) PRIMARY KEY) CREATE TABLE Test1 (cField C(5) references Test2 TAG cField ) DROP TABLE test2 && Fails with error 1577. DROP TABLE TEST2 && Works.  Press Ignore when the following error occurs:

Table test2 is referenced in a relation.



DROP TABLE test2 gives the error. DROP TABLE TEST2 works without error and the table is deleted.

The REMOVE TABLE had a similar issue and it has also been resolved in Visual FoxPro 6.0.

