Update Error

Recieve a oled db error saying i must use a updateable query

string cmdString_Update = "UPDATE [table 1] SET yn = True WHERE yn=False AND type='avb'";
                    conn = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:/backend.mdb;Persist Security Info=True;Password=**;User ID=user;Mode=Read;Jet OLEDB:System database=c:/sec.mdw");

OleDbCommand mycommand_Update = new OleDbCommand(cmdString_Update, conn);
                           mycommand_Update.ExecuteNonQuery(); <--- Points to this line of code
Who is Participating?
NightmanConnect With a Mentor CTOCommented:
have a look at http://support.microsoft.com/kb/175168
Shows 4 possible causes.

Although I suspect yours is number 2 - your connection string explicitly sets the mode to Read, not ReadWrite.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.