Nico
4/17/2008 1:31:00 PM
Hi, here is my situation:
I fill up a dataset with two tables(with already data in it) inside.
I attach this dataset to a dataadapter so I can write any inserted objects
in the dataset into my database.
Then I use the OleDbCommandBuilder to get an insertcommand based on the
selectcommand.
Then I attach the datatablemappings.
And finally I use the update method of the dataadapter. Then I get a syntax
error in my INSERT statement. Now I found out what the problem was: some
fields contained a non-alphanumeric value. When I removed these, the problem
was fixed. But how would one fix this without removing it and still use the
commandbuilder or sortlike solution? The commandbuilder doesn't include any
"[" or "]" if the table field name contains any special characters(space,
slash, etc). Is there anything that can make the builder enclose the field
names in these brackets?
Kind regards,
Nico.