KnowledgeBase Archive

An Archive of Early Microsoft KnowledgeBase Articles

View on GitHub

Q191697: BUG: ALTER TABLE Command With Multiple Drop Statements Fails

Article: Q191697
Product(s): Microsoft FoxPro
Version(s): WINDOWS: 3.0b,5.0,5.0a,6.0
Operating System(s): 
Keyword(s): 
Last Modified: 19-AUG-1999

-------------------------------------------------------------------------------
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          :  
Technology        : kbVFPsearch kbAudDeveloper kbVFP300b kbVFP500 kbVFP600 kbVFP500a
Version           : WINDOWS: 3.0b,5.0,5.0a,6.0
Issue type        : kbbug
Solution Type     : kbpending

=============================================================================

THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Copyright Microsoft Corporation 1986-2002.