FIX: Sp_cursoropen Error With More Than One Parameter Marker

Last reviewed: April 9, 1997
Article 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 : kbfix6.50.sp2 kbnetwork SSrvGen
Version : 2.65.0201 6.5
Platform : WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: April 9, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.