Article ID: 272074 - Last Review: August 7, 2007 - Revision: 2.4 FIX: T-SQL Debugger Parses SQL Server 2000 Return Value IncorrectlyThis article was previously published under Q272074 On This PageSYMPTOMS
To obtain parameter information for the stored procedure that is being debugged, the Visual Basic T-SQL Debugger runs the SQL Server system stored procedure sp_sproc_columns. On SQL Server 2000, sp_sproc_columns returns @RETURN_VALUE rather than RETURN_VALUE as the name of the stored procedure return value parameter. Because the T-SQL Debugger is looking for the literal name RETURN_VALUE, this change in behavior causes the Visual Basic T-SQL Debugger to treat the return value incorrectly as an input/output parameter; as a result, the stored procedure debugging fails. When you click Step Into in the Visual Basic T-SQL Debugger window to debug a stored procedure, you may receive the following error message:
The following SQL Server error occurred. [Microsoft][ODBC SQL Server Driver][SQL Server] Procedure or function CustOrderHist has too many arguments specified.
The query could not be debugged due to a problem coordinating events with the server.
CAUSE
This problem occurs because of the name change of the return value parameter from RETURN_VALUE to @RETURN_VALUE in SQL Server 2000. This change was made for the sake of consistency with parameter naming conventions.
RESOLUTION
To resolve this problem, download Visual Basic 6.0 Service Pack 5 (SP5).
WORKAROUNDTo work around this problem, edit the incorrect call syntax in the Query box on the Stored Procedure tab. If you delete the "extra" first parameter, which is always displayed as zero (0), you can execute and debug the stored procedure as required. For example, change the call syntax fromSTATUSMicrosoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article. This bug was corrected in Service Pack 5 for Microsoft Visual Basic. For additional information about Visual Studio service packs, click the following article numbers to view the articles in the Microsoft Knowledge Base: 194022
(http://support.microsoft.com/kb/194022/EN-US/
)
INFO: Visual Studio 6.0 Service Packs, What, Where, Why To download the latest Visual Studio service pack, visit the following Microsoft Web site:194295 (http://support.microsoft.com/kb/194295/EN-US/ ) HOWTO: Tell That a Visual Studio Service Pack Is Installed http://msdn2.microsoft.com/en-us/vstudio/Aa718353.aspx
(http://msdn2.microsoft.com/en-us/vstudio/Aa718353.aspx)
MORE INFORMATIONSteps to Reproduce BehaviorThis problem only reproduces with Visual Basic Enterprise Edition 6.0, Service Pack 4 or earlier. In addition, you must be able to connect to an instance of SQL Server 2000.
APPLIES TO
| Article Translations
|
Back to the top
