Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

Last Updated: March 24, 2020

ISSUE

If you have both Office 365 and an earlier version of Office installed with MSI and you have a program that uses the OLEDB interfaces or the ADO.Net interfaces, you may encounter an error indicating that the database remains locked even after closing the connection.

This issue only occurs if you have Office 365 version 2002 installed and an older version of Office installed via MSI. For example, you may have Office 365 and the 2013 Access runtime or the 2010 Access Database Engine Redistributable installed.

SCENARIO

If you try to delete the database file in a .Net program after opening and closing a connection to the database file, you may see the following exception:

System.IO.Exception: 'The process cannot access the file 'path to database' because it is being used by another process.

If you look at the location of the database, you will also see that the Ace database locking file (databasename.laccdb) is still present.

Typically, after a period of time ranging from a few seconds to a few minutes, the locking file will be removed and access to the database will be restored.

Starting with version 2002 of Office 365, the version of Ace shipped with Office 365 will be the provider for COM OLEDB interfaces, while with prior versions, the version of Ace included with the MSI product would be used.

There is a difference in behavior, in particular with Office 365, connections are defaulting to using OLEDB Resource Pooling, while in MSI the connection did not use pooling by default. The impact of this is that connections are not released immediately when closed/destroyed, since the system holds onto them for potential re-use. This has the impact, however, of not releasing locks on the database file until the pool releases the connection.

STATUS: FIXED

This issue is now fixed.  If you launch Access, click 'File', then 'Account', then 'Update Options', and 'Update Now', this will ensure that you have the latest version, and all versions should have the fix available.

If you have Version 2002 (Current Channel), the issue is fixed in build 16.0.12527.20278 or greater.

If you have Version 2003 (Current Channel (Preview)), the issue is fixed in build 16.0.12624.20176 or greater.

If you have Version 2004 (Beta Channel), the issue is fixed in build is fixed in build 16.0.12705.10000 or greater.

No other versions are affected by this issue.

More Resources

Icon Experts (brain, gears)

Ask the experts

Connect with experts, discuss the latest news, updates, and best practices, and read our blog.

Microsoft Tech Community

Icon Community

Get help in the community

Ask a question and find solutions from Support Agents, MVPs, Engineers, and other Office users.

Office Forum on Answers

Icon feature request (light bulb, idea)

Suggest a new feature

We love reading your suggestions and feedback! Share your thoughts. We're listening.

Provide feedback

See Also

Fixes or workarounds for recent Office issues

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Was this information helpful?

What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×