Hello,
I just started coding in .NET and was testing out a few things like reading from an access database and writing to it. Reading is fine, but writing back to it has me frustrated. I've been trying for the past couple of days, looking up on google as well but nothing seems to work.
I have attached the solution and database to this post. If you would be willing to help, please extract the contents to C:\.
Here's a quick explanation of what I'm trying to do:
The table "Table1" has just 1 row. I'm trying to change the contents of the "value" column to "Shift 1 --> Shift 2" or anything else.
It always gives me the error message "Syntax error in UPDATE statement." I am using OleDbCommandBuilder so that I don't have to write my own update statement. I have tried that too and that also failed. Previously it complained about the primary key so I added that too! I'm just stuck here.
Honestly, god knows why MS loves to makes things so hard at times. It seems like things were much easier with DAO in VB 6.0/VBA atleast as far as accessing an Access database was concerned.
Thanks!!
I just started coding in .NET and was testing out a few things like reading from an access database and writing to it. Reading is fine, but writing back to it has me frustrated. I've been trying for the past couple of days, looking up on google as well but nothing seems to work.
I have attached the solution and database to this post. If you would be willing to help, please extract the contents to C:\.
Here's a quick explanation of what I'm trying to do:
The table "Table1" has just 1 row. I'm trying to change the contents of the "value" column to "Shift 1 --> Shift 2" or anything else.
It always gives me the error message "Syntax error in UPDATE statement." I am using OleDbCommandBuilder so that I don't have to write my own update statement. I have tried that too and that also failed. Previously it complained about the primary key so I added that too! I'm just stuck here.
Honestly, god knows why MS loves to makes things so hard at times. It seems like things were much easier with DAO in VB 6.0/VBA atleast as far as accessing an Access database was concerned.
Thanks!!
Attachments
Last edited by a moderator: