ID: Q140533
1.50 1.51 WINDOWS kbprg kbbuglist kbfixlist
The information in this article applies to:
The following ODBC error message may occur when you use one of the Desktop Database ODBC Drivers provided with Visual C++ version 1.5:
Maximum SQLPutData length exceeded.
State:22001,Native:0,Origin:[Microsoft][ODBC Single-Tier Driver]
The ODBC error message (22001) is caused by a bug in the Desktop Database ODBC drivers (such as FoxPro, Microsoft Access, and so on) included in Visual C++ version 1.5. Specifically, the Desktop Database drivers are not permitting multiple SQLPutData() ODBC API calls to exceed 64K for a parameter used in an SQL UPDATE statement. We have confirmed this to be a bug in the Desktop Database ODBC Drivers versions 1.01.1928 and 1.01.2115.
Because inserts do not cause the ODBC error, the workaround for this bug is to retrieve the values of the record, delete the record, change any values you want to update, and then add the record to the table.
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This problem was corrected in Microsoft Visual C++ version 1.52 for Windows. It is related to the 1.0-level Desktop Database ODBC Drivers that shipped with Visual C++ versions 1.5 and 1.51. Visual C++ version 1.52 ships with the new 2.0-level Desktop Database ODBC Drivers.
Additional reference words: 2.50 2.51 2.52 KBCategory: kbprg kbfixlist kbbuglist KBSubcategory: MFCDatabase
Keywords : kbDatabase kbMFC kbODBC kbVC kbbuglist kbfixlist
Version : 1.50 1.51
Platform : WINDOWS
Solution Type : kbfix
Last Reviewed: September 21, 1997