Access DB - 操作必须使用可更新的查询

时间:2021-08-17 15:36:27

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

我有一个我在VS2005,C#,.NET 2.0中构建的网站。该网站针对Access数据库进行交易。它在开发中工作正常。 mdb文件驻留在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.

我在这台机器上安装了IIS来测试网站,因为它将被部署。我将该站点发布到我的IIS虚拟目录。一切顺利。

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:

我已将以下权限应用于App_data文件夹:

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.

谢谢你的回复。我读过那篇文章。我还阅读了谷歌搜索结果的前4页,他们都谈到了DB文件夹的权限。我已经遵循了所有建议,没有结果。

  1. My permissions are set as the MS article describes.
  2. 我的权限设置为MS文章描述。

  3. The database is being opened in the correct mode, else it wouldn't work while testing.
  4. 数据库正在以正确的模式打开,否则在测试时无法正常工作。

  5. I'm not using ODBC, so that's out.
  6. 我没有使用ODBC,所以就这样了。

  7. I'm not using SQL server, so that's out too.
  8. 我没有使用SQL服务器,所以也是如此。

2 个解决方案

#1


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

用户(模拟或asp用户)必须具有在目录中创建文件的权限,因为Access会创建.ldb文件。

Other possible reasons are described in the MS Knowledgebase

MS知识库中描述了其他可能的原因

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.

谢谢你的回复。我读过那篇文章。我还阅读了谷歌搜索结果的前4页,他们都谈到了DB文件夹的权限。我已经遵循了所有建议,没有结果。

  1. My permissions are set as the MS article describes.
  2. 我的权限设置为MS文章描述。

  3. The database is being opened in the correct mode, else it wouldn't work while testing.
  4. 数据库正在以正确的模式打开,否则在测试时无法正常工作。

  5. I'm not using ODBC, so that's out.
  6. 我没有使用ODBC,所以就这样了。

  7. I'm not using SQL server, so that's out too.
  8. 我没有使用SQL服务器,所以也是如此。

#1


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

用户(模拟或asp用户)必须具有在目录中创建文件的权限,因为Access会创建.ldb文件。

Other possible reasons are described in the MS Knowledgebase

MS知识库中描述了其他可能的原因

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.

谢谢你的回复。我读过那篇文章。我还阅读了谷歌搜索结果的前4页,他们都谈到了DB文件夹的权限。我已经遵循了所有建议,没有结果。

  1. My permissions are set as the MS article describes.
  2. 我的权限设置为MS文章描述。

  3. The database is being opened in the correct mode, else it wouldn't work while testing.
  4. 数据库正在以正确的模式打开,否则在测试时无法正常工作。

  5. I'm not using ODBC, so that's out.
  6. 我没有使用ODBC,所以就这样了。

  7. I'm not using SQL server, so that's out too.
  8. 我没有使用SQL服务器,所以也是如此。