BUG: ALTER TABLE Command With Multiple Drop Statements Fails (191697)



The information in this article applies to:

  • 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 Q191697

SYMPTOMS

Executing an ALTER TABLE command, with multiple Drop statements, fails with the following error:
No rule to drop.

RESOLUTION

Use one ALTER TABLE command for each Drop statement needed.

Replace the ALTER TABLE command in the MORE INFORMATION section with the following code:
   ALTER TABLE test ALTER COLUMN field1 DROP DEFAULT
   ALTER TABLE test ALTER COLUMN field1 DROP CHECK
					

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this bug and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

Steps to Reproduce Behavior

Run the following code from a program (.prg) file:
   CLOSE DATABASES ALL
   CREATE DATABASE TestDB
   CREATE TABLE test (field1 c(10) CHECK NOT EMPTY(field1) DEFAULT 'xxx')
   *** The next line fails with the "No rule to drop" error.
   ALTER TABLE test ALTER COLUMN field1 DROP DEFAULT DROP CHECK
					

Modification Type:MajorLast Reviewed:5/12/2003
Keywords:kbbug kbpending KB191697