"Could not lock file" with Access build 14701.20248

Anonymous
2021-12-14T19:16:08+00:00

I had a client today who could not open their shared backend database. The system displayed the error “Could not lock file”.

I determined that Access was trying to open the file in exclusive mode, even though none of the normal methods to open the file exclusively were being applied:

• The File / Options / Client Settings / Advanced / Default open mode was set to Shared

• No command line /excl  was being used

• The user had Full Control permissions for the shared folder containing the database

• Creating a new test database opened it exclusively, so that no other user could open it.

• The newly created test database could not be reopened if another user opened it,

• Several other users could simultaneously open the new test database without a problem.

The user had been using the database for normal operations for several days prior to the problem.

The user’s system has updated to build 16.0.14701.20248 today.

All other test users had build 16.0.14701.20226.

I rolled the user's Office installation back to 16.0.14701.20226 by using the Office Deployment Tool https://support.microsoft.com/en-us/topic/how-to-revert-to-an-earlier-version-of-office-2bd5c457-a917-d57e-35a1-f709e3dda841 

The problem was solved.

Can anyone else confirm that this problem exists with the latest build of Access?

Neil Sargent

Smart IT Ltd

Microsoft 365 and Office | Access | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

50 answers

Sort by: Oldest
  1. Anonymous
    2022-01-13T07:35:20+00:00

    None of the issues you mention are related to the regression that was introduced on December 14, and is fixed in Version 2112, build 14729.20248.

    I'm not saying that you are not seeing some issues, but the change that caused issues would have no impact on pessimistic locking.  I cannot reproduce any problem with pessimistic locking.

    If you are still seeing "Database in use" errors, it is likely that you have some instance of Office that has not been updated (note that there is not yet a full fix for some versions, e.g. Office 2016 MSI).

    Shane Groff

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  2. Anonymous
    2022-01-13T09:15:57+00:00

    Well. I Have to disagree.

    1. FE application file is untouched (prior to dec 14). Files not moved. Verified to check modified date and its readonly. Pessimistic locking did work before and after "all updtes" and even after14729.20248 does it use optimistic locking.
    2. The strange errors when opening forms and then says "Database in use" is on my own machine when relinking to other BE file (same BE file but in other location to do development and avoid using production BE file).

    So the only Office used is mine and its updated correctly (100% sure since original "Databas in use" error on application start is gone).

    I would have to say that changing location to BE files does raise problems. It is NOT exact problem as original, but this behavior did never occor prior to 14 dec (and had been done many 100s of times earlier)

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2022-01-14T04:56:57+00:00

    Hi All,

    Really appreciate all your effort on reporting the problem here, your voice is always very important to us. Please kindly check the official article about the new updates: Error in Access when opening a database on a network file share, download and install the new update KB to fix the problem.

    Regards,

    Rena

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2022-01-14T05:42:58+00:00

    Hi, as I said, I'm not denying that you are seeing a problem, or even that there was some new problem that was introduced in your case on December 14. What I am saying is that if you have build 14729.20248, then any the problems you are seeing are not due to the issue that prevented opening databases in shared mode.

    Is the problem with pessimistic locking specific to a particular database? Or are you seeing that for any database? If you just create a new database to use as a back end, then create a new database to use as a front end, with a form that has RecordLocks=EditedRecord, you are not seeing that when you edit a record using the form in one instance that other instances are locked out of editing that record?

    If you can provide the steps you are using to reproduce the problem, that might clarify what issue you are having. If you think you could provide databases that demonstrate the problem, I can help you do that.

    I'm not sure I understand exactly what you are reporting for #2. Can you provide a set of steps that you are performing, and what you expect to happen, and what actually happens (including the exact text of any error messages you see)?

    Shane

    Was this answer helpful?

    0 comments No comments
  5. Anonymous
    2022-01-14T07:02:36+00:00

    Thanks for your reply Shane!

    #1Yes, I understand that it might not be related. But the application FE has not been touched long before 14 dec (the system has lived for 8+ years :)) and it previously worked fine with pessimistic locking. Since no development for some time and no testing regarding locking, and the users might not even try to edit same records, or does not report if they get the "optmistic three choice dialog" (overwrite, cancel, copy to clipboard). So unfortunatly can Inot say how long pessimstic locking has not been working.

    All the forms have "RecordLocks=EditedRecord".

    However since none-critical do I leave this for a while. I'll try to reproduce with new FE+BE and see if I can get a clean reproducable case.

    #2 A bit hard to explain and the error did not occur for all forms. Even if I reproduced it three times yesterday can I not reproduce it today! (Good or bad I don't know).
    I'll give the case again. FE+BE on server. Copying the files to my locale machineand relink tables from local FE to local BE. (Doing some development in the FE.). Relinking the FE to BE on server. Copying/replacing FE on server. Then opening some forms and erors occored (before form is shown). Not all forms and not every open. Strange and intermittent (the worst types of bugs :-)).

    Error message on open was: "Can not update. Database or object is read-only". And twice I also got this bad boy: "Reserved error (-3034); there is no message for this error".

    So unfortunalty (might be good) can i not reproduce the problem now. So thanks anyhow and I'll have to see if the problem is gone and if it occurs again I'll get back to you.

    Thanks,

    Sven

    Was this answer helpful?

    0 comments No comments