Fix [Microsoft][ODBC Microsoft Access Driver] Cannot Update. Database Or Object Is Read-Only Error

Does your Microsoft ODBC Microsoft Access Driver showing error like “Cannot update. Database or object is read-only”? If yes, then immediate step is must to resolve this issue.

Don’t have any idea how to get rid this error code? Well don’t freak out…. just try the mentioned solution in this post.

Practical scenario:

This regards an Access 2010 accdb with a SQL Server back end: This front end is using a linked view to enter or update data (using INSTEAD OF trigger). The problem is that every so often it gives the “Cannot update. Database or object is read-only” error when trying to enter or update data through this view. The only thing that fixes this issue is deleting the linked view, relinking it and setting the primary key again. However, this fix doesn’t last, the problem usually shows up again the next day and has to be fixed again.

Is there a way to do this automatically? That is when the user opens the front end some code runs that relinks this view and sets its primary key? Any other ideas on how to solve this issue?

Thanks!

SOURCE:

https://answers.microsoft.com/en-us/msoffice/forum/msoffice_access-mso_winother/accdb-linked-view-error-cannot-update-database-or/2a4af031-9997-47ff-af6c-0fc30143eaa6?auth=1

Symptoms:

This error of “Cannot update. Database or object is read-only” mostly encounters are the following scenario:

  • While executing update queries against a linked Microsoft SharePoint view.
  • Underlying list that you are updating includes lookup fields that are not actually linked to Access because they are not included in the current view.

In such situation, you will receive the following error message:

[Microsoft][ODBC Microsoft Access Driver] Cannot update. Database or object is read-only.

 Cause

The error comes when you use the ImportSharePointList macro action in Access 2016, while in previous version it is known as TransferSharePointList to link to view of a SharePoint list in Access.  This macro will create the linked table in access for each of the lookup column in the SharePoint view.

However when the update query is executed, it checks whether the lookup columns have linked tables in the database for the underlying list. The update query doesn’t check exclusively for the lookups which are the part of the current query.

Workaround To fix Cannot update Database or object is read-only

To fix this [Microsoft][ODBC Microsoft Access Driver] Cannot update. Database or object is read-only, try out the fixes mentioned below:

Method 1

Link the entire lookup column in the underlying list to tables. For this, just follow down theses steps:

  1. Like to SharePoint list itself. This assures that all lookup tables for the underlying list are present within Access.
  2. Now delete the linked table for the SharePoint list in Access.
  3. After this link the SharePoint view by using the ImportSharePointList macro action.

Following all these above mentioned steps, will help Access to make a linked table for the SharePoint view and linked table for the entire Lookup columns in the underlying list instead for only the lookup columns which are included in the view.

YOU MAY ALSO LIKE:

How To Fix The Access Runtime Error 3847: “ODBCDirect Is No Longer Supported” In Windows 7/8/10 PC?

How To Fix MS Access Run-time 3146 ODBC Call Failed Error?

Method 2:

You can also try disabling caching in access 2010. For this, just follow down theses steps:In Access, go to the File > Options.

  1. Select Current Database.
  2. Now scroll down to the Caching Web Service area, and then locate the Microsoft SharePoint tables.
  3. Choose the Never Cachecheck box.

Troubleshooting Other Similar ODBC Microsoft Access Driver Error Messages

Error Message 1:

Operation must use an updateable query.Microsoft OLE DB Provider for ODBC Drivers error ‘80004005’ .[Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query.

Solution:

Well this error usually occur when you try to insert data into or update data in Access Database. It shows that you don’t have sufficient permission to write the database.

 So make sure that you have uploaded your database to the /db folder which located at the same directory level as www or wwwroot.

Error Message 2:

General error Unable to open registry key.Microsoft OLE DB Provider for ODBC Drivers (0x80004005).[Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key ‘Temporary (volatile) Jet DSN for process 0x6cc Thread 0x78c DBC 0x144cfc4 Jet’.

Solution:

The error can arise due to several reasons, among all the reasons; the main reason is that the path to the database is incorrect.

So, check that the path of the database is correct or not. For this you just need to use the physical path on the server to the database not the virtual path.

Error Message 3:

Could not find file.Microsoft JET Database Engine (0x80004005).Could not find file ‘C:\Inetpub\wwwroot\databaseName.mdb’.

Solution:

This error usually occurs if the path to the database is incorrect. By default all shared hosting client don’t have the permission to access the C:\Inetpub\*.

So, you need to check whether the path to the database is correct or not. Similarly, for this case also you just need to use the physical path on the server to the database not the virtual path.

Error Message 4:

Table ‘tblTable’ is exclusively locked by user ‘Admin’ on machine ‘MyMachine’.Microsoft JET Database Engine error ‘80004005’.Table ‘tblTable’ is exclusively locked by user ‘Admin’ on machine ‘MyMachine’.

Solution:

The error itself says either you are unable to open the table or you already have the table open in Design View in Microsoft access.

 So, close the access application completely and try once again.

Error Message 5:

The search key was not found in any record.Microsoft JET Database Engine (0x80004005).The search key was not found in any record.

Solution:

If this error comes to your screen then it means the database has become corrupted.

To fix this error, the database needs to be repaired. If the database is on remote server then download it and follow the below given instruction to repair it:

  • Open the database in Microsoft Access, click on the ‘Tools’ menu and select ‘Database Utilities -> Compact and Repair Database’.
  • After the database has been repaired, upload it again to the server using FTP.

YOU MAY ALSO LIKE:

How To Fix MS Access Run-Time Error 3061 OpenRecordSet

Error Message 6:

 It may not be a database that your application recognizes, Microsoft JET Database Engine error ‘80004005’ .Cannot Open Database or the file may be corrupt.

Solution:

This error generally encountered in a shared server environment. Access database have a maximum range of accessing 20 users at one time. You have many solutions to fix this error:

  1. Convert to a SQL database.

2.If your database is in MS Access 97 version, upgrade it to Access 2000 or later and reupload your database.

Error Message 7:

[Microsoft][ODBC Microsoft Access 97 Driver] The Microsoft Jet database engine cannot open the file ‘(unknown)’. It is already opened exclusively by another user, or you need permission to view its data, Microsoft OLE DB Provider for ODBC Drivers error ‘80004005’

Solution:

There are several reasons behind this error message:

  • The file and the data source name are marked as Exclusive.
  •  Reason can be the delegation issue so check the authentication method if it has. If the Universal Naming Convention (UNC) is used for connection string , then try to use Basic authentication or an absolute path like  C:\Mydata\Data.mdb.it issue can also occur if the UNC points to a resource that is local to the IIS computer.
  • This error may also occur when you access a local Microsoft Access database that is linked to a table where the table is in an Access database on a network server.

Conclusion:

Overall you must have got idea about all the commonly encountered ODBC Microsoft Access Driver errors and most importantly how to fix them. So, now you can fix any type of ODBC Drivers error ‘80004005’ error on your own.

tip Still having issues? Fix them with this Access repair tool:

This software repairs & restores all ACCDB/MDB objects including tables, reports, queries, records, forms, and indexes along with modules, macros, and other stuffs effectively.

  1. Download Stellar Repair for Access rated Great on Cnet (download starts on this page).
  2. Click Browse and Search option to locate corrupt Access database.
  3. Click Repair button to repair & preview the database objects.

Pearson Willey is a website content writer and long-form content planner. Besides this, he is also an avid reader. Thus he knows very well how to write an engaging content for readers. Writing is like a growing edge for him. He loves exploring his knowledge on MS Access & sharing tech blogs.