Back

'Operation must use an updateable query' errors when using an Access database as the datasource?

Problem
When using Microsoft Access, you may have come across one of the following errors:
 
Microsoft OLE DB Provider for ODBC Drivers error '80004005' 
[Microsoft][ODBC Microsoft Access 97 Driver]
Operation must use an updateable query.
 
or
 
Microsoft JET Database Engine (0x80004005)
Operation must use an updateable query.
 
or
 
Microsoft OLE DB Provider for ODBC Drivers error '80040e09'
[Microsoft][ODBC Microsoft Access 97 Driver]
Record(s) can't be read; no read permission on '

'.
 
or
 
Microsoft JET Database Engine error '80040e09'
Cannot update. Database or object is read-only.
 
or
 
Microsoft OLE DB Provider for ODBC Drivers error '80040e09'
[Microsoft][ODBC Microsoft Access 97 Driver] You don't have the necessary
permissions to use the '
' object. Have your system administrator or
the person who created this object establish the appropriate permissions for
you. 
  
This is almost always a certainly a permissions issue.

Ensure that the MDB file is in a folder where IUSR_ and IWAM_ have read/write access (because the anonymous user needs to create an .LDB file when modifying the database). If you are using Windows Authentication, make sure all authenticated users belong to a group that has read/write permissions on the folder where the database exists, and if you can't use a group, step through each user and check that they have sufficient privileges.
 
Also be sure that the MDB file itself isn't marked as read-only, and that you don't have the MDB file open (particularly in exclusive mode) while trying to reach the DB from ASP. Make sure you are not using simple file sharing, that you are using an NTFS volume, and that you open Access using the mode adModeReadWrite (see Article #2142 for sample usage of the mode property of ADODB.Connection). 
 
Another possible reason is that the column actually can't be updated, for example because of a constraint relationship with another table.

Back


Make a Comment on this Article

Your Name:
Comment: