PRB: Query Designer Reports Syntax Error but Still Succeeds

Last reviewed: December 11, 1997
Article ID: Q166883
The information in this article applies to:
  • Microsoft Visual Database Tools, version 1.0

SYMPTOMS

The Query Designer reports an error after valid SQL text is entered into the SQL text pane and executed.

CAUSE

When text entered into the SQL pane is executed, the Query Designer first processes the text and then sends it to the database for execution. An error dialog box may appear if either of these two steps is unsuccessful.

After you enter text into the SQL pane, the query designer first attempts to understand the text and graphically map its elements into the Diagram and Grid panes. When the statement cannot be understood, a notification dialog box containing a brief description of the error appears. The Diagram and Grid panes turn gray, indicating the failure. If the syntax is recognized, the Diagram and Grid panes update to show the query graphically.

In the second step, the text is sent to the database for processing. If the database does not recognize the SQL syntax, it returns an error that is displayed by the query designer. If the SQL syntax is recognized, the result set or success/fair report is displayed.

RESOLUTION

To execute statements without the first verification step, simply use the right-click context menu to hide the Diagram and Grid panes. With these panes turned off, the first verification step is bypassed and the raw text is sent directly to the database for execution.

STATUS

This behavior is by design.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Start the Query Designer.
2. In the SQL Pane, enter the following text:

      CREATE TABLE test1 (field1 char (20))

  • Click the RUN (!) toolbar button.

    Result: Since the query designer cannot display this type of SQL statement graphically, a notification dialog box indicating this appears. After the notification dialog box is cleared, a success report indicating that the table was created on the server appears.

    REFERENCES

    For the latest Knowledge Base articles and other support information on Visual InterDev and Active Server Pages, see the following page on the Microsoft Technical Support site:

       http://support.microsoft.com/support/vinterdev/
    
    
    Keywords          : kbDtQDesigner
    Version           : 1.0
    Platform          : WINDOWS
    Issue type        : kbprb

  • ================================================================================


    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.

    Last reviewed: December 11, 1997
    © 1998 Microsoft Corporation. All rights reserved. Terms of Use.