Recently, I was helping others process data, and found that when adding data, it prompted "ASP cannot be updated. The database or object is read-only." I searched online, but my problem was not solved.
1. The directory where the server's data directory mdb file is located is read-only.
2. Change the local permissions of the database to read-only permissions, and then upload it.
3. It is possible that you moved from a read-only directory to a readable directory, so you must not use it in this way. Download it to the local first and then upload it to solve this kind of problem.
"Cannot update, the database or object is read-only" solution
When I first came into contact with Dreamweaver, I always encountered this error when making a simple page to write data to the access database:
Microsoft OLE DB Provider for ODBC Drivers error '80004005', [Microsoft][ODBC Microsoft Access Driver] cannot be updated.
The database or object is read-only. Tried debugging multiple times but it doesn't work.
There is no other way but to search on Baidu, haha. It seems that many people have encountered my situation. A search will reveal a lot of relevant information. The benefits of resource sharing, ^_^
Solution:
The problem causing this is the access permissions of the site directory, because when using the Access database, a .ldb file needs to be generated in the same directory. If this directory
If there is no write permission or the Access database itself does not have write permission, this error will occur. Since most websites accessed through a browser use the Internet to access anonymously,
We only need to add the "IUSR_computer name" user to the directory permissions of the database and give it "write" permission. I found some articles saying
Let's join the EveryOne user and give "write" permission. This is too dangerous. In principle, this directory is added so that users can write it when configuring IIS.
Internet anonymous access users generally default to "IUSR_computer name", but if it is a virtual host, you have to check it yourself.
The specific operation method is:
Right-click the directory where the database is located (or its superior directory, but be sure to inherit permissions) -> Select "Sharing and Security" -> Select the "Security" tab ->
Click the "Add" button -> Click the "Advanced..." button -> Click the "Find Now (N)" button -> Find the user name with the prefix "IUSR_"
(The format is IUSR_computer name) -> Select this user and click OK -> This user will be added -> In the permission box of "Internet Guest Account",
In addition to the default, select "Write Permission" -> "Apply" or "OK".