FIX: Sp_cursoropen Error With More Than One Parameter Marker

ID: Q154966


The information in this article applies to:
  • Microsoft SQL Server version 6.5


SYMPTOMS

When you use server side cursors, SQL Server Driver invokes the extended stored procedure Sp_cursoropen with incorrect parameters when the following conditions are met:

  • The number of parameter markers in the WHERE clause of a SELECT statement are more than one.


  • The parameter markers correspond to CHAR or VARCHAR datatypes.


  • The network packet size is set to 512 bytes in the server configuration/options.


In addition, SQL Server Driver generates the following error message:
szSqlState = "37000", *pfNativeError = 16903,
szErrorMsg="[Microsoft][ODBC SQL Server Driver][SQL Server]
sp_cursoropen procedure called with incorrect number of parameters".

The following error message appears if any further activity occurs on the client side:
Communication link failure.


WORKAROUND

Set the Network Packet Size greater than 512 bytes in Server Configuration/Options using Sp_configure.


STATUS

Microsoft has confirmed this to be a problem in Microsoft SQL Server Driver 2.65.0201. This problem has been corrected in U.S. Service Pack 2 for Microsoft SQL Server version 6.5. For more information, contact your primary support provider.

Additional query words: 2.65.0201 2.65.0212 parameter markers

Keywords : kbnetwork SSrvGen kbfix6.50.sp2
Version : 2.65.0201 6.5
Platform : WINDOWS
Issue type :


Last Reviewed: March 31, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.