999 ERR-2147217900 Microsoft ODBC Microsoft Access Driver Syntax error in INSERT INTO statement - Support

999 ERR-2147217900 Microsoft ODBC Microsoft Access Driver Syntax error in INSERT INTO statement

From Support

Jump to: navigation, search
If you have a question or seek clarification, please call Technical Support.

Problem:

User keeps getting the following ADO/ODBC error when trying to insert records into a MS Access database via SQL and the RPG2SQL Integrator:

999 ERR-2147217900 [Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement.

Solution:

Make sure not to use reserved SQL keywords as field names in SQL databases.

Possible SQL reserved keywords include: select, group, order, from, by, where or any other special SQL keywords.

- BJS -

-or-

If a user gets the same error number and they are using a table name with a @ symbol in the table name, make sure to put [] around the table name. Reason for that is SQL uses @ for varialbe names, so it doesn't know its a table name, it thinks its a varialbe instead.

Example

Rtn = SQL_RunSQLExec(SQL_Socket:
'insert into [@NameAddr] ' +       
etc...
Personal tools