System.Data.OleDb.OleDbException:操作必须使用一个可更新的查询 [英] System.Data.OleDb.OleDbException: Operation must use an updateable query

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

问题描述

我很困惑。我想一个记录加入到使用ASP.Net Access 2000数据库。
然而,当我尝试添加新的记录,我得到以下错误:

I'm confused. I'm trying to add a single record into an Access 2000 database using ASP.Net. However, when I try to add new record, I get the following error:

异常详细信息:System.Data.OleDb.OleDbException:操作必须使用一个可更新的查询

Exception Details: System.Data.OleDb.OleDbException: Operation must use an updateable query.

推荐答案

不可否认,错误消息是误导。

Admittedly, the error message is misleading.

原因此错误消息是该进程中的身份(通常是ASP.NET),只有具有读取访问数据库,也没有获得修改运行。

The reason for this error message is that the process runs under an identity (usually ASP.NET) that only has read access to the database and hasn't access to modify that.

因此​​,要解决这个问题,必须设置为数据库文件ASP.Net用户的完全访问权限。
如果本地计算机上运行它,你可以右键单击Windows资源管理器数据库文件,转到安全选项卡,并给予ASP.NET用户修改权限,该文件,但如果你的互联网上你的网站必须使用您的控制面板设置(如C-面板或Plesk中)来设置权限。

So, to solve this problem you must set full access of ASP.Net user to Database file. If run it on local machine you can right click on the database file in Windows Explorer, go to the Security tab, and give the ASP.NET user modify rights to the file, but if your web site on the internet you must using your Control panel setting (such as C-Panel or Plesk) to set permission.

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

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