Error - Microsoft JET Database Engine 0x80040E09 Cannot update. Database or object is read-only.

Problem :

Microsoft JET Database Engine (0x80040E09)
Cannot update. Database or object is read-only.

Solution
if you cannot Update / Add records into your MDB database but can retrive the records without errors
this usually indicates that you did not set the appropriate
permissions on the database. The security account used by the web server IIS service
should have at least "Write" permissions on the database file

The security account used by the web server IIS service is "Internet Guest Account"
To set permissions for this user follow the steps below

1) Right Click the database file i.e yourdatabase.mdb
2) Select the security tab
    if you cannot see the security tab follow the steps below
    1)Open windows explorer go to Tools in that Folder Options in that View tab
        2)Scroll to the last item of that displayed page which is "Use Simple File Sharing"
        3)Remove the tick against that line and click OK        
    Now follow the above 2 steps
    
3)Select the "Internet Guest Account"
4)Give appropriate permissions for this user by selecting the check boxes
    should give at least "Write" permissions on the database file
        
Now test your code        

 
Categories