BUG: ALTER TABLE Command With Multiple Drop Statements Fails

ID: Q191697


The information in this article applies to:
  • Microsoft Visual FoxPro for Windows, versions 3.0b, 5.0, 5.0a, 6.0


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 

Additional query words: kbVFp500abug kbVFp600bug kbVFp300bbug KbDBFDBC kbDatabase kbvfp500a kbvfp500 kbvfp600

Keywords :
Version : WINDOWS: 3.0b,5.0,5.0a,6.0
Platform : WINDOWS
Issue type : kbbug


Last Reviewed: August 18, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.