How to fix the "Cannot update. "Database or object is read-only" OLE DB or ODBC Provider error.
Sample Error
You may see a message like "Microsoft OLE DB Provider for ODBC Drivers (0x80004005)" or "[Microsoft][ODBC Microsoft Access Driver] Cannot update" or "Database or object is read-only".
Solution or Workaround
This error usually indicates that you did not set the appropriate permissions on the database, "somename.mdb". The security account used by the web server IIS service should have at least "Write" permissions on the database file (Note: You cannot set the permissions from within IIS, see below).
HOSTED SITES: Most web hosting services have a 'file manager' or permissions manager available for you, usually in your control panel - contact your web host for assistance. If your host does not offer a permission manager, they will be able to adjust the permissions for you.
DEDICATED SERVERS: To adjust the file permissions, you need to locate the file "somename.mdb" by using "My computer". Right click on the file, click on "Properties". Next, click on "Security". There are several user/system accounts listed, you'll need to modify the permissions for the account that the IIS web service uses (if you don't know, you can always add the user "Everyone" and give it "Full Control").
IIS CONSOLE: You cannot use the IIS console to change the file permissions, the Access settings in the IIS console are not the same as "File Permissions". The settings in IIS only control what web browsers/internet users have access to (not file security).
MISSING SECURITY TAB?
If your hard drive is formatted NTFS, you can set permissions on files and folders by right-clicking on the file. If your XP workstation is a standalone or part of a workgroup, the security tab may be hidden. To unhide, open Windows Explorer. Choose Folder Options from the Tools menu. On the View tab, scroll to the bottom of the Advanced Settings. Clear the check box next to "Use Simple File Sharing." Click OK to apply the change.
HOSTED SITES: Most web hosting services have a 'file manager' or permissions manager available for you, usually in your control panel - contact your web host for assistance. If your host does not offer a permission manager, they will be able to adjust the permissions for you.
DEDICATED SERVERS: To adjust the file permissions, you need to locate the file "somename.mdb" by using "My computer". Right click on the file, click on "Properties". Next, click on "Security". There are several user/system accounts listed, you'll need to modify the permissions for the account that the IIS web service uses (if you don't know, you can always add the user "Everyone" and give it "Full Control").
IIS CONSOLE: You cannot use the IIS console to change the file permissions, the Access settings in the IIS console are not the same as "File Permissions". The settings in IIS only control what web browsers/internet users have access to (not file security).
MISSING SECURITY TAB?
If your hard drive is formatted NTFS, you can set permissions on files and folders by right-clicking on the file. If your XP workstation is a standalone or part of a workgroup, the security tab may be hidden. To unhide, open Windows Explorer. Choose Folder Options from the Tools menu. On the View tab, scroll to the bottom of the Advanced Settings. Clear the check box next to "Use Simple File Sharing." Click OK to apply the change.
Related Articles
Other Resources
Related Topics
Search for help...