Cry about...
MS-Windows Troubleshooting


ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query


Symptom:

When trying to add a record to a database table, the following exception is thrown:

[System.Data.Odbc.OdbcException]: {System.Data.Odbc.OdbcException}
HelpLink: Nothing
InnerException: Nothing
Message: "ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query."
Source: "odbcjt32.dll"

Cause

The ASP.NET worker process does not have permission to update the database. (This is certainly true when the error is generated when trying to add a record to a table in MS-Access.)

Remedy:

These apply for MS-Access only:

  1. Check that the database file does not have the read-only attribute set.
  2. Ensure that the ASP.NET process has full control over the folder containing the MS-Access database and the database itself. (Folder properties, Security tab, grant "Full Control" to the  ASP.NET machine account.).

These notes have been tested within Microsoft Visual Studio .NET 2003 running under Windows XP Professional, and may apply to other versions as well.



About the author: is a dedicated software developer and webmaster. For his day job he develops websites and desktop applications as well as providing IT services. He moonlights as a technical author and consultant.