Error -2147217904 Too few parameters Expected 12 inserting record to .mdb using RPG2SQL - Support

Error -2147217904 Too few parameters Expected 12 inserting record to .mdb using RPG2SQL

From Support

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

Problem:

When using the INSERT statement to insert a record into an Access database the user was getting the following error in the RPG2SQL server component debug window:

999 ERR-2147217904 [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 12.

Solution:

The user was using the following statement which showed up in the debug window:

SQL Execute: Insert into PostedToBoth Values(2762287.00,1046827.00,"06/02/2004","REGULAR","BV",3.75,"  ","1621","BIN","ISC","SLOTS-1621","4C FB VIP  SELF","CGB","ISSUE","200404",.55581800,.44458400,.00,.00,.00,.00,2.08,1.67,.00,.00,.00,.00,3.75)

The problem is caused because the user was not passing the field names along with the field values. Apparently the ODBC driver needs the field names but Access does not. Make sure the fieldnames and values are passed in the command.

Personal tools