FIX: Cannot Insert BLOB Data Larger Than 128k w/ SQLSetParam

Last reviewed: May 1, 1997
Article ID: Q136745

The information in this article applies to:
  • Microsoft Open Data Base Connectivity, version 2.5
  • Microsoft SQL Server, versions 4.21a
BUG# NT: 10224 (4.21a)

SYMPTOMS

When you connect to SQL Server version 4.21a and use the SQLSetParam function to insert image or text data where the total size (such as the cbcoldef argument for SQLSetParam) is larger than 128K, you will receive the following error message from the SQL Server driver:

   [Microsoft][ODBC SQL Server Driver][SQL Server] Memory request failed
   because more than 64 pages are required to run the query in its
   present form. The query should be broken up into shorter queries if
   possible[#703].

CAUSE

This problem only occurs when the SQLSetParam function is used.

WORKAROUND

Use the ODBC version 2.0 function SQLBindParameter instead of SQLSetParam.

STATUS

Microsoft has confirmed this to be a problem in the SQL Server Driver version 2.50.121. This problem was corrected in Service Pack 1 for SQL Server version 6.0. For more information, contact your primary support provider.

MORE INFORMATION

Before you connect a SQL Server Driver version 2.50.121 or later to SQL Server version 4.21a, make sure that the INSTCAT.SQL file that ships with the driver has been executed on the server. The INSTCAT.SQL script upgrades the catalog stored procedures used by the driver.


Additional query words: sql6 odbc
Keywords : kbbug4.21a kbfix6.00.sp1 kbprg SSrvProg
Version : 2.5.121 4.21a 6.0
Platform : WINDOWS
Issue type : kberrmsg


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: May 1, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.