Runtime Error - Operation must use an updateable query

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pavya
    New Member
    • Feb 2008
    • 5

    Runtime Error - Operation must use an updateable query

    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.Ole Db.OleDbExcepti on: Operation must use an updateable query.

    Source Error:


    Line 150:
    Line 151: //Execute command
    Line 152: cmd.ExecuteNonQ uery();
    Line 153: }
    Line 154: //Repeat above steps until last line is read from file


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

    Stack Trace:


    [OleDbException (0x80004005): Operation must use an updateable query.]
    System.Data.Ole Db.OleDbCommand .ExecuteCommand TextErrorHandli ng(Int32 hr)
    System.Data.Ole Db.OleDbCommand .ExecuteCommand TextForSingleRe sult(tagDBPARAM S dbParams, Object& executeResult)
    System.Data.Ole Db.OleDbCommand .ExecuteCommand Text(Object& executeResult)
    System.Data.Ole Db.OleDbCommand .ExecuteCommand (CommandBehavio r behavior, Object& executeResult)
    System.Data.Ole Db.OleDbCommand .ExecuteReaderI nternal(Command Behavior behavior, String method)
    System.Data.Ole Db.OleDbCommand .ExecuteNonQuer y()
    ASG.CSVtoDb.Btn Ok_Click(Object sender, EventArgs e) in c:\inetpub\wwwr oot\asg\csvtodb .aspx.cs:152
    System.Web.UI.W ebControls.Butt on.OnClick(Even tArgs e)
    System.Web.UI.W ebControls.Butt on.System.Web.U I.IPostBackEven tHandler.RaiseP ostBackEvent(St ring eventArgument)
    System.Web.UI.P age.RaisePostBa ckEvent(IPostBa ckEventHandler sourceControl, String eventArgument)
    System.Web.UI.P age.RaisePostBa ckEvent(NameVal ueCollection postData)
    System.Web.UI.P age.ProcessRequ estMain()




    --------------------------------------------------------------------------------
    Version Information: Microsoft .NET Framework Version:1.1.432 2.573; ASP.NET Version:1.1.432 2.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
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    Well if I can quote these people:

    Be sure that the MDB file is in a folder where IUSR_<machineNa me> and IWAM_<machineNa me> 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.

    Comment

    Working...