ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query
When trying to add a record to a database table, the following exception is thrown:
Message: "ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query."
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.)
These apply for MS-Access only:
- Check that the database file does not have the read-only attribute set.
- 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: Brian Cryer 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.