Mombu the Microsoft Forum sponsored links

Go Back   Mombu the Microsoft Forum > Microsoft > Cannot update MS-access table
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 2nd July 16:00
anders
External User
 
Posts: 1
Default 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
  Reply With Quote


  sponsored links


2 2nd July 16:00
anders
External User
 
Posts: 1
Default Cannot update MS-access table



Solution found. Database placed in shared folder, then
everything worked fine.
  Reply With Quote
Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666