By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,480 Members | 755 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,480 IT Pros & Developers. It's quick & easy.

Runtime Error - Operation must use an updateable query

P: 5
Hi,
I have developed one Web application. At that time my system had a FAT file system on it and this application worked properly. But now i have converted FAT file system to NTFS file system and whenever i am trying to run this application then it through the exception. I have used MS Access as a database. The error is as follows...


Server Error in '/ASG' 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 150:
Line 151: //Execute command
Line 152: cmd.ExecuteNonQuery();
Line 153: }
Line 154: //Repeat above steps until last line is read from file


Source File: c:\inetpub\wwwroot\asg\csvtodb.aspx.cs Line: 152

Stack Trace:


[OleDbException (0x80004005): Operation must use an updateable query.]
System.Data.OleDb.OleDbCommand.ExecuteCommandTextE rrorHandling(Int32 hr)
System.Data.OleDb.OleDbCommand.ExecuteCommandTextF orSingleResult(tagDBPARAMS dbParams, Object& executeResult)
System.Data.OleDb.OleDbCommand.ExecuteCommandText( Object& executeResult)
System.Data.OleDb.OleDbCommand.ExecuteCommand(Comm andBehavior behavior, Object& executeResult)
System.Data.OleDb.OleDbCommand.ExecuteReaderIntern al(CommandBehavior behavior, String method)
System.Data.OleDb.OleDbCommand.ExecuteNonQuery()
ASG.CSVtoDb.BtnOk_Click(Object sender, EventArgs e) in c:\inetpub\wwwroot\asg\csvtodb.aspx.cs:152
System.Web.UI.WebControls.Button.OnClick(EventArgs e)
System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler sourceControl, String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData)
System.Web.UI.Page.ProcessRequestMain()




--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573


I have checked security setting for the datbase. but still it returns same exception.
Any body can tell me what is the problem here?

Thanks
Feb 27 '08 #1
Share this Question
Share on Google+
1 Reply


Plater
Expert 5K+
P: 7,872
Well if I can quote these people:
http://databases.aspfaq.com/database...ry-errors.html
Be sure that the MDB file is in a folder where IUSR_<machineName> and IWAM_<machineName> have read/write access (because the anonymous user needs to create an .LDB file when modifying the database). If you are using Windows Authentication, make sure all authenticated users belong to a group that has read/write permissions on the folder where the database exists, and if you can't use a group, step through each user and check that they have sufficient privileges.
Feb 27 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.