Click here to Skip to main content
15,884,986 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Server Error in '/' Application.

Operation must use an updateable query.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

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

Source Error:


Line 26: cmd.Parameters.AddWithValue("@ecat", cat);
Line 27: cn.Open();
Line 28: int i= cmd.ExecuteNonQuery();
Line 29: cn.Close();
Line 30: return i;

Source File: c:\domains\Paystole.com\wwwroot\App_Code\Dal\DEduCat.cs Line: 28

Stack Trace:


[OleDbException (0x80004005): Operation must use an updateable query.]
System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(OleDbHResult hr) +1081596
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
DEduCat.DInsert(String cat) in c:\domains\Paystole.com\wwwroot\App_Code\Dal\DEduCat.cs:28
BEduCat.BInsert() in c:\domains\Paystole.com\wwwroot\App_Code\Bal\BEduCat.cs:33
Admin_Education.bntSave_Click(Object sender, EventArgs e) in c:\domains\Paystole.com\wwwroot\Admin\Education.aspx.cs:80
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +118
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +112
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1025
Posted

1 solution

Since we can't see your query we can only guess as to what might be wrong.

This link, http://stackoverflow.com/questions/19789709/operation-must-use-an-updateable-query-error-in-ms-access[^], has several suggestions of what it can be.

Since your title indicates that it worked in dev but not in production I would go with solution 1 from the link, a permissions issue or read-only flag on the database.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900