Exception Details: System.Data.OleDb.OleDbException: 操作必须使用一个可更新的查询。

Exception Details: System.Data.OleDb.OleDbException: 操作必须使用一个可更新的查询。


Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace: 


[OleDbException (0x80004005): 操作必须使用一个可更新的查询。]
   System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(OleDbHResult hr) +1068184
   System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult) +247
   System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult) +194
   System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult) +58
   System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method) +167
   System.Data.OleDb.OleDbCommand.ExecuteNonQuery() +113
   APP_DAL.DBbase.Update(String StrSql) in E:\刘楚\2014-6\彭后街道办事处\程序2.0\PhJdBsc\APP_DAL\DBbase.cs:68
   APP_DAL.T_New.scannum(Int32 ID) in E:\刘楚\2014-6\彭后街道办事处\程序2.0\PhJdBsc\APP_DAL\T_New.cs:155
   PhJdBsc.NewDetail.BindData(Int32 ID) in E:\刘楚\2014-6\彭后街道办事处\程序2.0\PhJdBsc\PhJdBsc\NewDetail.aspx.cs:32
   PhJdBsc.NewDetail.Page_Load(Object sender, EventArgs e) in E:\刘楚\2014-6\彭后街道办事处\程序2.0\PhJdBsc\PhJdBsc\NewDetail.aspx.cs:21
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
   System.Web.UI.Control.OnLoad(EventArgs e) +91
   System.Web.UI.Control.LoadRecursive() +61
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1966

程序是我在Vs.netBeta2 + Access200无误通过的!
在2003中加载提示转换后
再运行出如上错误???

如何解决ADO.NET访问Access数据库出现"操作必须使用一个可更新的查询"的问题(非原创,摘自书中) 
问题分析:分析一下用户访问的情况,用户请求web页面,服务器使用系统内置的的IIS_WPG组的帐户


来访问Access数据库,若IIS_WPG组的帐户没有Access数据库文件的"修改"权限,就会产生这个异常


"IIS_WPG"用户组是用于访问和管理IIS信息的内置帐户,默认情况下对IIS中虚拟目录的文件只有"读取"


权限.


解决方法:


在Access数据库文件上单击右键->属性->安全


单击添加,在文本框中输入"IIS_WPG",单击确定,


给IIS_WPG设置权限,选中"允许写入",确定OK!


---------------------------------------------
有时查不到安全选项卡怎么办?


找到数据文件夹所在地,在窗口上找到工具-->文件夹选项-->查看-->使用简单文件共享(推荐)的勾去掉,
然后按上面写的做即可
-------------------------------
方法二:在ervryone 中给读权限,即可

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值