Access DB - Operation must use updateable query

时间秒杀一切 提交于 2019-12-10 23:31:21

问题


I have a website I've built in VS2005, C#, .NET 2.0. This website does transactions against an Access database. It works fine in development. The mdb file resides in App_Data

I have setup IIS on this machine to test the website as it would be deployed. I published the site to my IIS virtual directory. All went well.

Whenever I try to update, insert, or delete I get the above error "Operation must use an updateable query."

I have applied the following permissions to the App_data folder:

machinename/IUSR - modify
machinename/ASPNET - modify
NETWORK SERVICE - modify
domainname/myaccount - full

I even went crazy and gave the group EVERYONE full permissions, but that didn't work either.

In my web config I have the following line:

<identity impersonate="true"/>

This line is to impersonate my login account to provide access to the application.

I still cannot perform insert, update, or delete queries. Any ideas?

UPDATE:

Thanks for the response. I have read that article. I have also read about the first 4 pages of google results and all of them talk of permissions to the DB folder. I have followed all suggestions, with no results.

  1. My permissions are set as the MS article describes.
  2. The database is being opened in the correct mode, else it wouldn't work while testing.
  3. I'm not using ODBC, so that's out.
  4. I'm not using SQL server, so that's out too.

回答1:


The user (impersonated or the asp user) must have the permission to create files in the directory because Access creates a .ldb file.

Other possible reasons are described in the MS Knowledgebase

UPDATE: Did you check the effective permissions? Maybe inheritance comes into play here, because of an explicit deny.




回答2:


Thanks for the response. I have read that article. I have also read about the first 4 pages of google results and all of them talk of permissions to the DB folder. I have followed all suggestions, with no results.

  1. My permissions are set as the MS article describes.
  2. The database is being opened in the correct mode, else it wouldn't work while testing.
  3. I'm not using ODBC, so that's out.
  4. I'm not using SQL server, so that's out too.


来源:https://stackoverflow.com/questions/481138/access-db-operation-must-use-updateable-query

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!