I'm building an SQL INSERT command using the OleDbCommandBuilder
adapter.InsertCommand = builder.GetInsertCommand();
and I get an exception while trying to add data to database on this line:
adapter.Update(ds, tableName);
and the exception:
System.Data.OleDb.OleDbException: 'Syntax error in INSERT INTO statement.'
I've set a breakpoint on this line and found out that the syntax of the insert command is correct:
INSERT INTO order (orderid, employeeid, dateestimated, datearrived) VALUES (?, ?, ?, ?)
And the parameters are correct as well: 0x1, 0x2, 13/10/2017, null
Why am I getting a syntax error exception when the syntax is clearly correct and the parameters are right?
The exception's source says Microsoft Access Database Engine.