This error occurs if the following are true:
- The CursorType is adOpenForwardOnly (0).
- The CursorLocation is adUseServer.
- A field being updated has a space in the field name.
- You are using the Microsoft Access ODBC driver.
Calling the AddNew and Update methods, on a Server-Side, Forward-Only
cursor, is an invalid operation. ActiveX Data Objects (ADO) compensates for
this code flaw by generating an INSERT statement to perform the operation.
When ADO generates the INSERT statement, it does not delimit the field
names. Therefore, field names that contain a space generate a syntax error.
For example, a valid INSERT statement would be as follows:
INSERT INTO Table ([field with space]) Values(value)
ADO generates the following code:
INSERT INTO Table (field with space) Values(value)