帮助中心 >  技术知识库 >  云服务器 >  服务器教程 >  ASP.NET Exception Details: System.Data.OleDb.OleDbException: 操作必须使用一个可更新的查询。

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

2017-07-25 11:46:56 8646

错误代码:

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!


提交成功!非常感谢您的反馈,我们会继续努力做到更好!

这条文档是否有帮助解决问题?

非常抱歉未能帮助到您。为了给您提供更好的服务,我们很需要您进一步的反馈信息:

在文档使用中是否遇到以下问题: