L
Landley
Hi All,
I have a "lovely" access database as my datasource. The table 4 columns (of
data types Number, Date/Time, Text, Text) and a number column is the primary
key.
I am using the command builder in ODBC objects to generate the INSERT,
UPDATE and DELETE commands.
The INSERT command generated looks like this:
"INSERT INTO my_table ( number_column, date_column, text_column1,
text_column2 ) VALUES ( ? , ? , ? , ? )"
which is what I expect. I have added a new row to my datatable. I then use
a dataadapter.Update to apply this change to the database.
This great exception occurs:
ERROR [42000] [Microsoft][ODBC Microsoft Access Driver] Syntax error in
INSERT INTO statement.
If this was happening across the board, then I would immediately think that
I am doing something wrong. But it's not, so I am not. This save routine
is generic and works for 4 other tables with similar structure. It takes a
table name as a parameter, does as SELECT * FROM the table name for the
SelectCommand and generates the other commands based on this.
Any ideas?
Landers
I have a "lovely" access database as my datasource. The table 4 columns (of
data types Number, Date/Time, Text, Text) and a number column is the primary
key.
I am using the command builder in ODBC objects to generate the INSERT,
UPDATE and DELETE commands.
The INSERT command generated looks like this:
"INSERT INTO my_table ( number_column, date_column, text_column1,
text_column2 ) VALUES ( ? , ? , ? , ? )"
which is what I expect. I have added a new row to my datatable. I then use
a dataadapter.Update to apply this change to the database.
This great exception occurs:
ERROR [42000] [Microsoft][ODBC Microsoft Access Driver] Syntax error in
INSERT INTO statement.
If this was happening across the board, then I would immediately think that
I am doing something wrong. But it's not, so I am not. This save routine
is generic and works for 4 other tables with similar structure. It takes a
table name as a parameter, does as SELECT * FROM the table name for the
SelectCommand and generates the other commands based on this.
Any ideas?
Landers