FIX: Replay of Prepared Cursor Statements May Generate Error 16902

Article translations Article translations
Article ID: 252865 - View products that this article applies to.
This article was previously published under Q252865
This article has been archived. It is offered "as is" and will no longer be updated.
BUG #: 54703 (SQLBUG_70)
Expand all | Collapse all

Symptoms

When attempting to replay a trace captured with SQL Profiler that contains prepared cursor statements (sp_cursorprepare), the following error may occur:
Server: Msg 16902, Level 16, State 21, Line 0
sp_cursorprepare: The value of parameter 'paramdef' is invalid.
This error occurs when the query is submitted as a parameterized query, but no parameter markers are actually supplied, resulting in the second parameter value being NULL.

Status

Microsoft has confirmed this to be a problem in SQL Server 7.0. This problem has been corrected in U.S. Service Pack 2 for Microsoft SQL Server 7.0. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
254561 INF: How to Obtain Service Pack 2 for Microsoft SQL Server 7.0 and Microsoft Data Engine (MSDE) 1.0
For more information, contact your primary support provider.

More information

Beginning in SQL Server 7.0 Service Pack 2, SQL Server accepts NULL as a valid second parameter to sp_cursorprepare and does not generate an error in this situation.

Properties

Article ID: 252865 - Last Review: October 26, 2013 - Revision: 3.0
Applies to
  • Microsoft SQL Server 7.0 Standard Edition
Keywords: 
kbnosurvey kbarchive kbbug kbfix KB252865

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com