ACC: "Too Many Fields Defined" Error Message in Update Query (154070)
The information in this article applies to:
- Microsoft Access 1.0
- Microsoft Access 1.1
- Microsoft Access 2.0
- Microsoft Access for Windows 95 7.0
- Microsoft Access 97
This article was previously published under Q154070
Moderate: Requires basic macro, coding, and interoperability skills.
SYMPTOMS
When you run an update query with more than 127 fields selected, you may
receive the error message, "Too many fields defined." However, this same
query will run correctly when you select 127 fields or fewer.
CAUSE
The Microsoft Jet database engine has an internal limit of 255 fields per
query. As the Microsoft Jet database engine iterates through the records in
an update query, it creates a field for the original value and a field for
the updated value. When more than 127 fields are selected, it reaches the
255 field limit of a query.
Consider the following SQL for an update query:
UPDATE Table SET A=B, C=D
Internally the query looks as follows:
SELECT A,B,C,D
FROM Table
RESOLUTION
Break down the update query into multiple update queries with 127 or fewer
fields per query.
-or-
Update the fields by using a recordset in Visual Basic for Applications.
For more information about updating recordsets, search the Help Index for
"Update Method."
REFERENCES
For more information about the "Too many fields defined" error message,
please see the following article in the Microsoft Knowledge Base:
128221 ACC: "Too Many Fields Defined" Error Message Saving Table
Modification Type: | Major | Last Reviewed: | 5/9/2003 |
---|
Keywords: | kberrmsg kbprb KB154070 |
---|
|