Microsoft KB Archive/303761

= ACC2000: A &quot;SQL Statement Too Long&quot; Error Message Appears When You Try to Update a FoxPro 6.0 Table =

Article ID: 303761

Article Last Modified on 7/13/2004

-

APPLIES TO


 * Microsoft Access 2000 Standard Edition

-



This article was previously published under Q303761



Moderate: Requires basic macro, coding, and interoperability skills.

This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).



SYMPTOMS
When you try to update a linked Microsoft FoxPro 6.0 table in Access 2000, you may receive one or both of the following error messages:

SQL statement too long

-or-

ODBC - insert on a linked table ' ' failed. [Microsoft][ODBC ]Cannot update the cursor. #146



CAUSE
This behavior occurs because Access tries to update the entire record even if you are updating only one field, and the SQL statement has a 2,028-byte limit.



RESOLUTION
To work around this behavior, use one of the following methods:
 * If you want to update only some of the fields in the table, create a SQL statement that includes only the fields that you are updating.
 * If you want to update all of the fields in the table, split the update into multiple SQL statements that are all within the 2,028-byte limit.

Additional query words: prb

Keywords: kbprogramming kbprb KB303761

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.