B
Brad Markisohn
I'm having problems updating a boolean value in an Access database. The
value is defined as a Yes/No type that I've always assumed could be treated
as a simple boolean. To update the value, I retrieve the data from the
specified table into a DataTable from a OleDbDataAdapter. I cycle through
the rows looking for the specific value to replace. I then replace the
value in the DataTable then create an UPDATE query and run the
OleDbDataAdapter's UpdateCommand method. Here's the exception message that
I get: "System.Data.OleDB.OleDbException: Syntax error in UPDATE statement."
I've been able to replace non-boolean values without any problems, but I
keep hitting a snag on the booleans. Here's an example of the query that
I'm using in the UpdateCommand:
"UPDATE Device SET Mg = 'True' WHERE NAME = 'Desired Name'"
I've also tried replacing 'True' with its numeric equivalent (-1) with the
same results
Any assistance would be greatly appreciated.
Brad
value is defined as a Yes/No type that I've always assumed could be treated
as a simple boolean. To update the value, I retrieve the data from the
specified table into a DataTable from a OleDbDataAdapter. I cycle through
the rows looking for the specific value to replace. I then replace the
value in the DataTable then create an UPDATE query and run the
OleDbDataAdapter's UpdateCommand method. Here's the exception message that
I get: "System.Data.OleDB.OleDbException: Syntax error in UPDATE statement."
I've been able to replace non-boolean values without any problems, but I
keep hitting a snag on the booleans. Here's an example of the query that
I'm using in the UpdateCommand:
"UPDATE Device SET Mg = 'True' WHERE NAME = 'Desired Name'"
I've also tried replacing 'True' with its numeric equivalent (-1) with the
same results
Any assistance would be greatly appreciated.
Brad