Access DB-操作必须使用可更新的查询 [英] Access DB - Operation must use updateable query

查看:62
本文介绍了Access DB-操作必须使用可更新的查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个在VS2005,C#、. NET 2.0中建立的网站.该网站针对Access数据库进行交易.它在开发中运行良好.该mdb文件位于App_Data中

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

我已经在这台机器上安装了IIS,以测试将要部署的网站.我将该站点发布到了IIS虚拟目录中.一切顺利.

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."

我已对App_data文件夹应用了以下权限:

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?

更新:

感谢您的回复.我已经读过那篇文章.我还阅读了有关Google搜索结果的前4页,所有这些都谈到了对DB文件夹的权限.我遵循了所有建议,没有结果.

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. 我的权限已按照MS文章中的说明进行设置.
  2. 正在以正确的模式打开数据库,否则在测试时它将无法正常工作.
  3. 我不使用ODBC,所以没问题.
  4. 我不使用SQL Server,所以也没用.

推荐答案

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

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

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

更新: 您检查有效权限了吗?也许是因为显式地拒绝继承在这里起作用.

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

这篇关于Access DB-操作必须使用可更新的查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆