Solve the problem that ASP can't be updated, database or object is read-only.

  

Recently, it helps others to process the data. When adding data, it prompts "ASP can't update. Database or object is read-only." Did not solve my problem.
1, the server's data directory mdb file is located in the directory, read-only
2, the database local permissions, to read-only permissions, then upload
3, there are Maybe you are moving from a read-only directory to a readable directory, so you must not use it. You can solve this kind of problem by going down to the local and uploading it.


"Cannot update, database or object is read-only" solution
first contact with Dreamweaver, when doing a simple page implementation to write data to the access database, always encountered Such an error:
Microsoft OLE DB Provider for ODBC Drivers error '80004005', [Microsoft][ODBC Microsoft Access Driver] cannot be updated.
The database or object is read-only. Debugging multiple times does not work.
No way, only Baidu, huh, huh. It seems that I have encountered a lot of this situation. I have a lot of relevant information when I check it. The benefits of resource sharing, ^_^

Solution:

This cause The problem is the access rights of the site directory, because when using the Access database, you should generate an .ldb file in the same directory. If the directory
does not have write permission or the access database itself does not have write permission, then it will ** * This error. Since most websites are accessed through browsers using anonymous Internet access,
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 that it is too dangerous to join the EveryOne user and give "write" permission. In principle, this directory plus can be written to the user is added in the IIS when the
Internet anonymous access user, the default is "IUSR_ computer name", but if it is a virtual host you have to look at it.

The specific operation method is:

Right click on the directory where the database is located (or its superior directory, but be careful to inherit the permissions) -> select "Share and Security" -> Select "Security" "tab->
Click the "Add" button -> click the "Advanced..." button -> Click the "Find Now (N)" button -> Find the username with the prefix "IUSR_"
(Format For IUSR_computer name) -> select this user, click OK -> then the user is added -> in the "Internet Guest Account" permission box,
in addition to the default also select "write permissions "-> "Apply" or "OK".

Copyright © Windows knowledge All Rights Reserved