To resolve the error message:
Microsoft OLE DB Provider for ODBC Drivers error ' 80004005 '
[Microsoft] [ODBC Microsoft Access Driver] Operation must use a
Updateable query.
Reason:
There are several main reasons for the error:
This error occurs when your program attempts to perform an updated database or other similar operation. This is because
ADO is not able to write a database because of several reasons below.
1, the most common reason is that the anonymous user account (Iusr_machine) does not have write access to the database file.
To resolve this problem, adjust the properties of the database file in the organizer so that anonymous users have the correct permissions. When you use an Access database, you will not only write permissions to the file, but also write permissions to the directory, because Jet needs to create a. ldb file in that directory.
2, the second reason is that the database does not use the correct mode to open. You should open it using 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 0 (adModeUnknown), which is allowed to be updated.
3. It is also possible to select the Read-only option for this DSN in the ODBC Administrator.
4, you are updating the fields in two tables at the same time, you will also receive this error message, the solution is to update the two tables in separate fields.
5. When you use a query from a lower version (such as access2.0,access7.0) loaded into a high version (ACCESS 2000), this error occurs when you execute this query