all groups > dotnet odbc.net > april 2008 >
You're in the

dotnet odbc.net

group:

OleDbCommandBuilder generated statements


OleDbCommandBuilder generated statements Nico
4/17/2008 3:31:05 PM
dotnet odbc.net:
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.

AddThis Social Bookmark Button