Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MS Access - "file already in use" error on split database

Tags:

ms-access

I have a split database in MS Access 2010 on Windows 7.

The back end is on a networked drive in a folder that only some people have write permissions; everyone has read permissions.

Every user has their own copy of the front end stored on their local machine.

Both BE & FE are set to open as shared, not exclusive, for all users.

If a user with read-only permissions tries to get on while another user with read-only permissions is on, they can get on fine.

If a user with read-only permissions tries to get on while a user with write permissions has it open, they get a message saying " file already in use" and they can't open the database.

If a user with write permissions tries to open the database while a user with read-only permissions has it open, it opens as read-only for this user as well.

Do ALL users of a split database need full access? I really don't want everyone to be able to make edits. Anything I can do to get this to work?

like image 335
maneesha Avatar asked Oct 18 '12 16:10

maneesha


People also ask

Could not use MS Access database file already in use?

The Error Message database throw is 'Couldn't use <database filename>; file already in use ' In most of the cases you may find that this error 3045 came because the file you were trying to open was already in use by different users or was previously opened on any other instance of MS Access application.

What does file already in use mean?

If a user with read-only permissions tries to get on while a user with write permissions has it open, they get a message saying " file already in use" and they can't open the database.

Could not use file already in use error 3045?

Basic Explanation. This error occurs if another user (or instance of Access) has opened up the database exclusively and you try to open it. Maybe the other user opened the database in exclusive mode or made some modifications such as editing modules, which put the database in exclusive mode.

What happens when a user splits an Access database?

When you split a database, you reorganize it into two files — a back-end database that contains the data tables, and a front-end database that contains all the other database objects such as queries, forms, and reports. Each user interacts with the data by using a local copy of the front-end database.


1 Answers

The issue has certainly something to do with the fact that the read-only clients can't manage the .laccdb lock file since they don't have write permission to the shared folder in which the database file resides.

When the database is opened in shared mode, each client will create or update the lock file.
It's likely that since read-only clients can't create the lock file, they fall-back to believing they are in exclusive mode.
Once a full-access client creates the lock file, any subsequent client will attempt to use it, and read-only clients will fail since they can't update the lock.

Some documentation regarding lock files:Introduction to .ldb files

If you want to solve your issue, you must grant full access to the folder for all clients, but you can restrict access to the .accdb database file itself to the group of clients that are not supposed to be able to modify data in it.

Alternatively, if you are not using Access 2007/2010 features, you can revert to using an older .mdb file as a backend and use their old-style group security features.

Ultimately, if you really want to control access, you may need to roll-you-own security scheme from within the client, forcing users to log-in (or use their the identity of their machine) and update your forms' data edit properties depending on what that particular user/machine is allowed to do.

like image 163
Renaud Bompuis Avatar answered Nov 14 '22 23:11

Renaud Bompuis