The resolve operation must use an updatable query

Source: Internet
Author: User
Tags anonymous odbc query access database
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



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.