FIX: Error Message Should Be Clearer When There Are Multiple SELECTs in a Stored Procedure (197563)



The information in this article applies to:

  • Microsoft SQL Server 6.5

This article was previously published under Q197563
BUG #: 17913 (SQLBUG_65)

SYMPTOMS

In versions of SQL Server earlier than SQL Server 6.5 Service Pack 5, if you erroneously attempt to open a server cursor on a stored procedure that contains more statements than a single SELECT statement, you will receive the following somewhat incomplete error message:
Cannot open a cursor on a stored procedure that has anything other than a single select statement in it.

STATUS

Microsoft has confirmed this to be a problem in SQL Server 6.5. This problem has been corrected in Service Pack 5a for Microsoft SQL Server 6.5.For more information, click the following article number to view the article in the Microsoft Knowledge Base:

197177 INF: How to Obtain SQL Server 6.5 Service Pack 5a

For more information, contact your primary support provider.

MORE INFORMATION

The error message is accurate, but it does not provide complete information to allow the developer to address the error.

Based on customer feedback, this error message has been changed to be clearer. With SQL Server 6.5 Service Pack 5, the error message now reads:
A server cursor is not allowed on a stored procedure with more than one SELECT statement. Use a default result set or client cursor.

Modification Type:MajorLast Reviewed:3/14/2006
Keywords:kbBug kbfix KB197563