If, in your SelectCommand.CommandText
you have a SELECT * FROM Analogue
, then the InsertCommand
built by the OleDbCommandBuilder
contains an INSERT column for every column.
If you want to remove some columns from the INSERT then you need to build the command by yourself.
However, the origin of the Syntax Error, is the presence of reserved words in Access 2007 like NAME and DESCRIPTION. The solution is simple, Mr Schmelter has already pointed in its comment.
OleDbCommandBuilder myCommandBuilder = new OleDbCommandBuilder(myDataAdapter);
myCommandBuilder.QuotePrefix = "[";
myCommandBuilder.QuoteSuffix = "]";
This will force the OleDbCommandBuilder to construct the CommandText for insert and update using the appropriate Prefix and Suffix around the column names and table names resulting in a CommandText like
"INSERT INTO [Analogue] ([Name], [Area], [Description], ...) VALUES(?, ?, ?, ...)"
The DataAdapter.UpdateCommand executes both INSERT/UPDATE/DELETE commands looking at the DataRow.RowState property of the row in the DataTable that has been changed