PRB: Breakpoints Not Hit in Multiple Line SQL Statements

Last reviewed: July 21, 1997
Article ID: Q169403
The information in this article applies to:
  • Microsoft Visual Studio, Enterprise Edition 97
  • Microsoft Visual C++, 32-bit Enterprise Edition, versions 4.2, 5.0
  • Microsoft Visual Basic Enterprise Edition for Windows, version 5.0

SYMPTOMS

When trying to debug stored procedures, it is possible to run into the following behavior. Examples are listed below:

   UPDATE <table1>
      SET <column>=0 WHERE -- SET clause of UPDATE statement is an invalid
      breakpoint

   SELECT * FROM <table1> where NOT EXIST
      (SELECT * FROM <table2> WHERE... ) -- subselect statement is an
      invalid breakpoint

CAUSE

The problem is that the debugger will allow invalid breakpoints set on certain SQL statements. The problem with this behavior is that the break point is never hit.

RESOLUTION

The listed behavior is inherent in the lexer because it is based on what is in the first line and does not handle multiple line SQL statements.

MORE INFORMATION

In the case of the UPDATE statement listed above, the debugger will allow breakpoints to be placed on the SET clause to the UPDATE statement because SET is a valid SQL command. Unfortunately, the breakpoint will not be hit because SET is part of the multiple line UPDATE statement and therefore not considered a separate SQL statement.

STATUS

Microsoft has confirmed this behavior to be by design in the Microsoft products listed at the beginning of this article.


Keywords : vb5all vcbuglist500
Version : 4.2 5.0 97
Platform : NT 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: July 21, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.