Search code examples
databasevb.netoledbjetoledbdataadapter

OleDbCommandBuilder OleDbDataAdapter Problem VB.Net


I have a field in a 2003 access database named first. I run the data adapter update command, gives me "Syntax error in UPDATE statement." I change the field name to firstName, try the update again, it works. I already have a bunch of programs using the database and using the field "first", do I really have to rename my field, go back and update all my programs to read from firstName instead of first? I really don't want to go that route if I don't have to. Any suggestions? Thanks!

(provider=microsoft.jet.oledb.4.0)

*Edit: I meant to specify, I want the answer to use commandbuilder (but it won't work that way). Sorry for any confusion.


Solution

  • oledbcommandbuilder breaks when fields are named with the reserved word "first". Had to write my own SQL