PDA

View Full Version : Update a record in Access database


bkagan98
01-31-2004, 11:17 AM
I am having a problem with updating records in Access database.

Error that displayed is: "Operation must use an updateable query".

Code:
OleDbConnection myConnection = new OleDbConnection(DataBaseConnectionString);
OleDbCommand myCommand = new OleDbCommand(mySQL, myConnection);
myCommand.Connection.Open();
myCommand.ExecuteNonQuery();
myConnection.Close();

Connection string and UPDATE SQL statement are defined before executing these code.

Any ideas?
Thanks in advance.

steurm
02-01-2004, 03:44 AM
this is probably caused by security settings. You need to give the ASPNET user account write permissions on you access db (or the folder where it resides).

--
Steurm
www.steurm.net/steurm

bkagan98
02-01-2004, 09:38 AM
Thank you, Steurm. It is working fine after I changed user access settings on database folder. This happened on my machine and I hope that standard database folder created by discountASP does have all correct settings.

Boris