You must Sign In to post a response.
  • Category: ASP.NET

    Error : Operation must use an updateable query.

    Hi ,Developers,

    Using OLEDB MS Access Database,

    I am created a project and hosted it.While i am insert record on live it throws the following error .

    ==> It is working fine in Local machine with no error.
    ==> But it is not working on live. What i can do for solve this problem
    ==> I got struggle in this place and i get confused a lot..

    i am google it but really i don't know what should do.

    So can you please anyone help me to i am solve this problem.

    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 60: cmd.Parameters.AddWithValue("@event", txtEvents.Text.ToString());
    Line 61: cmd.Parameters.AddWithValue("@posted_date", dt.ToString());
    Line 62: cmd.ExecuteNonQuery();
    Line 63: try
    Line 64: {

    Thanks With
  • #764337

    Hi Paul,

    I'm too new this problem but as per my search in Google, the cause of the problem is when you try to access the excel sheet that shouldn't be ReadOnly mode, because of this you may get this problem.

    To resolve this problem, I suggest you to go through below link that will help you.

    Give respect to your work, Instead of trying to impress your boss.

    Blog :

  • #764339

    Hai Paul,
    As per my understanding regarding the issue you are facing is that the MS access database is not having sufficient permission to update the data. You need to be administrator while accessing the data or you need to keep the database and application in the same directory so that it will be accessible.
    Hope it will be helpful to you.

    Pawan Awasthi(DNS MVM)
    +91 8123489140 (whatsApp), +60 14365 1476(Malaysia)

  • #764344
    Thanks mr.Naveen and mr.Pawan.

    i can try and let u know.


  • #764345

    Basically its a permission issue when .ldb file can not record query while executing. it will not occur on local machine, basically this occurred only at server
    Give following permission to database folder (where .lbd exist) and your application folder
    Give Modify security permission to 'NETWORK SERVICE' user it will resolve issue
    - How to give access permission to user
    1. Select folder
    2. Right click - properties
    3. Select security tab
    4. add 'NETWORK SERVICE' user
    5. select Modify access
    6. click on apply and OK.
    It will resolve your issue

    Editor, DotNetSpider MVM
    Microsoft MVP 2014 [ASP.NET/IIS]

  • #764346
    Hmmm ,Thanks Mr.Prasad .

    if it is .mdb file na, may i do the same ..? ah or to do anything else ah

    Then it need to be changed on my local machine or hosted machine Mr.Prasad.
    Can you please tell me..?

    Thanks with

  • #764359
    see, your local machine has full control on all folders, so access permission related issues will not occur on local machine, when you deploy your code on web server (IIS), your application will run under logged in user credential. In short on your local machine you need not to set access permissions on most of the cases.
    In your case .MDB and .LDB files are lies down on same folder so if you set access permission to that folder only, it will resolve problem for both files, no need to set file wise access permission, as access are inheritable from folder to all files

    Editor, DotNetSpider MVM
    Microsoft MVP 2014 [ASP.NET/IIS]

  • Sign In to post your comments