I am trying to run a simple application I downloaded from MSDN on my machine. When I attempt to run functions such as update a row I get the following error message.
Server Error in '/Pets' 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 102:OleDbCommand cmd = Line 103:new OleDbCommand(sql, conn);Line 104:cmd.ExecuteNonQuery();Line 105:}Line 106://catch (Exception e) |
Source File:c:\inetpub\wwwroot\pets\petform.aspx.cs
Line:104
Stack Trace:[OleDbException (0x80004005): Operation must use an updateable query.] System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(Int32 hr) +41 System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult) +174 System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult) +92 System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult) +65 System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method) +112 System.Data.OleDb.OleDbCommand.ExecuteNonQuery() +66 Pets.WebForm1.ExecuteNonQuery(String sql) in c:\inetpub\wwwroot\pets\petform.aspx.cs:104 Pets.WebForm1.btnAddPet_Click(Object sender, EventArgs e) in c:\inetpub\wwwroot\pets\petform.aspx.cs:88 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +57 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33 System.Web.UI.Page.ProcessRequestMain() +1277 |
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573
I believe this is something to do with the permissions set or something. Any help solving would be much appreciated.
Rory
Hi,
please see this thread in Access forum where this matter is discussed thoroughly
http://forums.asp.net/154273/ShowPost.aspx
And yes, it is about permissions for ASPNET user to the folder where mdb file resides. They must be at least read/write.
0 comments:
Post a Comment