DOCUMENT:Q191513 19-AUG-1998 [vbwin] TITLE :BUG: TSQL-Debugger Not Invoked Calling Second Stored Procedure PRODUCT :Microsoft Visual Basic for Windows PROD/VER:WINDOWS:2.0,6.0 OPER/SYS:WINDOWS KEYWORDS:kbDebug ====================================================================== --------------------------------------------------------------------- The information in this article applies to: - Microsoft Visual Basic Learning, Professional, and Enterprise Editions for Windows, version 6.0 - Microsoft Data Access Components version 2.0 --------------------------------------------------------------------- SYMPTOMS ======== If multiple stored procedures are executed, the TSQL-Debugger automatically starts for the first stored procedure, but does not automatically start upon executing the second or subsequent stored procedures. The following error message displays: The query could not be debugged due to a problem coordinating events with the server. Check the server and client log to find the exact cause, fix the problem and try again. STATUS ====== Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. MORE INFORMATION ================ Steps to Reproduce Behavior --------------------------- 1. Create a new Standard EXE project. 2. Add a reference to the Microsoft ActiveX Data Objects 2.0 Library. 3. From the Add-Ins menu, click Add_In Manager and then select the Visual Basic TSQL Debugger Loaded/Unloaded check box. 4. Paste the following code into the Form_Load section of the form. Change the Data Source, Initial Catalog, User ID and Password in the connection string to match your configuration: Dim cn As New ADODB.Connection Dim cmd As New ADODB.Command Dim cmd2 As New ADODB.Command cn.Open "Provider=SQLOLEDB;Data Source=;" & _ "Initial Catalog=pubs;User ID=sa;pwd=;" cmd.ActiveConnection = cn cmd.CommandText = "reptq1" cmd.CommandType = adCmdStoredProc cmd.Execute 'TSQL Debugger is invoked at this point. MsgBox "Error Will Occur Next" cmd2.ActiveConnection = cn cmd2.CommandText = "reptq1" cmd2.CommandType = adCmdStoredProc cmd2.Execute 'TSQL Debugger is not invoked at this point. 5. The error occurs as soon as the Form_Load finishes running. Additional query words: t-sql kbDebug kbSQLServ kbStoredProc kbADO kbTSQL ====================================================================== Keywords : kbDebug Version : WINDOWS:2.0,6.0 Platform : WINDOWS 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 1998.