Microsoft KB Archive/248745

= FIX: DB-Library Cursors on Stored Procedures May not be Created =

Article ID: 248745

Article Last Modified on 3/14/2006

-

APPLIES TO


 * Microsoft SQL Server 7.0 Standard Edition

-



This article was previously published under Q248745



BUG #: 53778 (SQLBUG_70)



SYMPTOMS
Under the following conditions, an application written with the DB-Library API using cursors may cause syntax errors as well as the cursor not being created:
 * The query sent with the dbcursoropen function is a stored procedure.
 * The function dbrpcparam is used to pass parameters to the stored procedure.
 * The type of one of the parameters is binary or varbinary.

Here are examples of the errors received:

Msg=170 Severity=15 State=1

Line 1: Incorrect syntax near '??'.

Msg=16945 Severity=16 State=1

The cursor was not declared.



WORKAROUND
Passing the binary datatype as a character type and converting it in the stored procedure works if the data does not contain any extended characters that could be translated through ANSI to OEM settings.



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.

Additional query words: dbcursoropen dbrpcparam

Keywords: kbbug kbfix KB248745

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.