I tried placing the Access database in various locations such as the following but to no avail:
"C:\Users\user\Documents\Visual Studio 2010\Projects\WebForm2",
"C:\Users\user\Documents\Visual Studio 2010\Projects\WebForm2\WebForm2\bin",
"C:\Users\user\Documents\Visual Studio 2010\Projects\WebForm2\WebForm2\App_Data"
Reading of data was fine but occurs only if I place the database in "C:\Program Files (x86)\Common Files\Microsoft Shared\DevServer\10.0". I thought it should be in the \bin of the application folder or perhaps "App_Data".
Hope someone is able to provide some advice on this problem. Thanks.
Make sure the account your code is running under (probably the anonymous user account) has write access not only to the MDB file, but also the folder in which it is located.
I'm afraid I no longer use this forum due to the new point allocation system.
Make sure the account your code is running under (probably the anonymous user account) has write access not only to the MDB file, but also the folder in which it is located.
I had placed the Access DB file in App_Data and under Properties --> Share tab, set "read/write" permissions for "user", "Everyone" and "All application packages". In the Security tab, full control is given to "Everyone", "System", "Administrator", "All
application packages".
The error still occurs. I'm able to read the data but not write. Is read and write within the same location?
As mentioned earlier, reading is not within App_Data since the program had earlier prompted me to save the Access DB file in C:\Program Files (x86)\Common Files\Microsoft Shared\DevServer\10.0.
Have already set the permission levels to "read/write" but still got the same error. I noticed that the App_Data folder is "read-only" even though I've unchecked and apply the change. Is there anything to do with that?
When you use the MDB file it will create an LDB file to manage the locks etc, and this is the reason you need write access to the folder itself, not just the mdb file. If your app_data folder is read-only then that will stop your code from working.
I'm afraid I no longer use this forum due to the new point allocation system.
None
0 Points
3 Posts
Operation must use an updateable query
Feb 12, 2013 09:20 AM|favourLettuce|LINK
This error occurs during execution of the code below:
I tried placing the Access database in various locations such as the following but to no avail:
"C:\Users\user\Documents\Visual Studio 2010\Projects\WebForm2",
"C:\Users\user\Documents\Visual Studio 2010\Projects\WebForm2\WebForm2\bin",
"C:\Users\user\Documents\Visual Studio 2010\Projects\WebForm2\WebForm2\App_Data"
Reading of data was fine but occurs only if I place the database in "C:\Program Files (x86)\Common Files\Microsoft Shared\DevServer\10.0". I thought it should be in the \bin of the application folder or perhaps "App_Data".
Hope someone is able to provide some advice on this problem. Thanks.
<div></div>All-Star
37441 Points
9076 Posts
Re: Operation must use an updateable query
Feb 12, 2013 09:41 AM|AidyF|LINK
Make sure the account your code is running under (probably the anonymous user account) has write access not only to the MDB file, but also the folder in which it is located.
All-Star
25756 Points
7014 Posts
Re: Operation must use an updateable query
Feb 12, 2013 10:37 AM|hans_v|LINK
No, you need MODIFY permissions on the folder!
http://www.mikesdotnetting.com/Article/74/Solving-the-Operation-Must-Use-An-Updateable-Query-error
All-Star
25756 Points
7014 Posts
Re: Operation must use an updateable query
Feb 12, 2013 10:39 AM|hans_v|LINK
It should be placed in the App_Data folder, or somewhere outside of the root of the website....
None
0 Points
3 Posts
Re: Operation must use an updateable query
Feb 13, 2013 09:01 AM|favourLettuce|LINK
I had placed the Access DB file in App_Data and under Properties --> Share tab, set "read/write" permissions for "user", "Everyone" and "All application packages". In the Security tab, full control is given to "Everyone", "System", "Administrator", "All application packages".
The error still occurs. I'm able to read the data but not write. Is read and write within the same location?
As mentioned earlier, reading is not within App_Data since the program had earlier prompted me to save the Access DB file in C:\Program Files (x86)\Common Files\Microsoft Shared\DevServer\10.0.
Which other locations could this file be stored?
All-Star
25756 Points
7014 Posts
Re: Operation must use an updateable query
Feb 13, 2013 01:29 PM|hans_v|LINK
That dsoesn't matter. Please read Mikes article?
None
0 Points
3 Posts
Re: Operation must use an updateable query
Feb 15, 2013 07:44 AM|favourLettuce|LINK
Have already set the permission levels to "read/write" but still got the same error. I noticed that the App_Data folder is "read-only" even though I've unchecked and apply the change. Is there anything to do with that?
All-Star
37441 Points
9076 Posts
Re: Operation must use an updateable query
Feb 15, 2013 08:25 AM|AidyF|LINK
When you use the MDB file it will create an LDB file to manage the locks etc, and this is the reason you need write access to the folder itself, not just the mdb file. If your app_data folder is read-only then that will stop your code from working.
All-Star
25756 Points
7014 Posts
Re: Operation must use an updateable query
Feb 15, 2013 10:25 AM|hans_v|LINK
Yes, you said
Please read Mikes article, and identify which user (using Environment.UserName) you need to give MODIFY permissions.....
None
0 Points
1 Post
Re: Operation must use an updateable query
Jun 28, 2013 11:04 PM|www.infolet.org|LINK
Give administrator permission to folder that contain your database file.
Just right click on db file -> Properties -> Security Tab
Here are 5 solutions to solve this error:
http://www.infolet.org/2013/06/fix-ms-access-operation-must-use-an-updateable-query-problem-error.html
C vb csharp msaccess Operationmustuseanupdateablequery