Microsoft KB Archive/136745

{|
 * width="100%"|

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

 * }

Q136745

-

The information in this article applies to:


 * Microsoft Open Database Connectivity, version 2.5
 * Microsoft SQL Server version 4.2x

-

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 : kbprogramming

Issue type : kbbug

Technology : kbSQLServSearch kbAudDeveloper kbODBCSearch kbSQLServ420OS2 kbODBC250