Cannot update MS-access table
Hi,
My code is very simple. I can easily read from the Access
table but cannot insert or delete in the table:
oleDbConnection1.ConnectionString
= "Provider=Microsoft.Jet.OLEDB.4.0; Data
Source=c:\\Test.mdb";
oleDbConnection1.Open();
testinsert = "INSERT INTO CONTACTS (FirstName, LastName)
VALUES ('Pete', 'Sampras')";
oleDbCommand1.CommandText = testinsert;
oleDbCommand1.ExecuteReader();
oleDbConnection1.Close();
I get the following error:
System.Data.OleDb.OleDbException: Operation must use an
updateable query
Thanks for any assistance.
Best regards Anders
|