G
Guest
I'm trying to update an existing record in an Access 2003 db and i'm getting
the following error:
The following error has occured ERROR [42000] [Microsoft][ODBC Microsoft
Access Driver] Syntax error in UPDATE statement.
at System.Data.Odbc.OdbcConnection.HandleError(HandleRef hrHandle,
SQL_HANDLE hType, RETCODE retcode) at
System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior,
String method) at System.Data.Odbc.OdbcCommand.ExecuteNonQuery() at
TimeKeeper.Default.AddUpdateEmployee() in
c:\inetpub\wwwroot\timekeeper\default.aspx.cs:line 315
but when i write out the update query, i'm getting the value:
UPDATE car_information.carModel= 'ME ' WHERE carID=8
here is my code:
string UpdateSQL = "UPDATE car_information.empName= '" + txtCarModel.Text +
"' WHERE carID=" + carID;
any suggestions? this app is in C#
the following error:
The following error has occured ERROR [42000] [Microsoft][ODBC Microsoft
Access Driver] Syntax error in UPDATE statement.
at System.Data.Odbc.OdbcConnection.HandleError(HandleRef hrHandle,
SQL_HANDLE hType, RETCODE retcode) at
System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior,
String method) at System.Data.Odbc.OdbcCommand.ExecuteNonQuery() at
TimeKeeper.Default.AddUpdateEmployee() in
c:\inetpub\wwwroot\timekeeper\default.aspx.cs:line 315
but when i write out the update query, i'm getting the value:
UPDATE car_information.carModel= 'ME ' WHERE carID=8
here is my code:
string UpdateSQL = "UPDATE car_information.empName= '" + txtCarModel.Text +
"' WHERE carID=" + carID;
any suggestions? this app is in C#