Error message:
Microsoft ole db provider for ODBC drivers error ''80004005''
[Microsoft] [ODBC Microsoft Access 97 driver] operation must use
Updateable query.
Or:
Microsoft Jet Database Engine (0x80004005)
The operation must use an updatable query.
Cause:
There are several major error causes:
This error occurs when your program tries to update the database or perform other similar operations. This is because
Ado cannot write data to the database for the following reasons.
1. The most common cause is that an anonymous user account (iusr_machine) has no write permission on the database file.
To solve this problem, adjust the database file attributes in the manager so that anonymous users have the correct permissions.
When using the ACCESS database, you must grant not only the write permission to the file, but also the write permission to the directory, because
Jet needs to create a. LDB file in this directory.
2. The second reason is that the database is not enabled in the correct mode. Use the following method.
SQL = "update products set unitprice = 2 ;"
Set conn = server. Createobject ("ADODB. Connection ")
Conn. mode = 3''' 3 = admodereadwrite
Conn. Open "mydsn"
Conn. Execute (SQL)
Conn. Close
Note that the default mode is set to 0 (admodeunknown), which allows update.
3. You may also select the read-only option of The DSN In the ODBC manager.
4. This error message is also displayed when you update the fields in both tables. The solution is to update the fields separately.
The two tables have their own fields.
5. When you use an earlier version (such as access2.0 and access7.0) to load data to a later version (Access 2000)
This error occurs when the query is executed.
if it is a WINXP System
simple sharing (recommended) is used by default in the folder options, remove this option.
right-click the folder and choose, the Security tab appears.
the default one is none, on the Security tab, you can set the user's write permission.
right-click Database> Security> everyone> check the required permissions.