Error 3051 - MS Access 2003

Run-time error '3051': The Microsoft Jet database engine cannot open the file C:\Program Files\MBRMS\xxfile.mdb.  It is already opened exclusively by another user or you need permission to view its data.
GayaTigaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

nico5038Commented:
Check the permission on the file/folder.
Access can´t work in a read-only folder...

Nic;o)

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
thenelsonCommented:
When the database is closed (probably will be since you can't open it;^) check to see it a file called xxfile.ldb exists in C:\Program Files\MBRMS\.  If it does, delete it.  You may need to reboot to delete it.

If you still cannot open the file check the security settings and share seltings.  

For databases on network computers, go to the level that is shared.  Usually that is an entire drive.  Right click on it and select "Sharing and Security". Make sure "Share this folder" is selected and there is a  share name that does not have a dollar sign ($) behind it in the drop down box. (The dollar sign share is a default share for administrator only.) IL there is not one, add it. Select a share without a dollar sign. Select permissions.  Make sure the users that will be using the DB have change and read permissions.  

Then right click on the folder(s) that contain the database(s) and select "Sharing and Security". Select security. Make sure the users have read, write, modify, and read & execute permissions. Select advanced. Edit the users that will access the databases. Make sure they have create files and delete permissions.

Then right click on the the database(s) and select "Sharing and Security". Select security. Make sure the users have read, write, modify, and read & execute permissions.

If you still cannot open it, the database Is probably corrupt:
Steps (approximately in order) to use to fix a corrupted Access database.

1) CREATE A BACKUP OF THE CORRUPT DATABASE. (Just in case)

2) Compact and repair

3) Use jetcomp.exe  http://support.microsoft.com/default.aspx?scid=kb;en-us;Q273956

4) decompile: in run: msaccess "dbPathName.mdb" /decompile
   Compact/repair:  in run: msaccess "dbPathName.mdb" /compact
   compile: in VB editor: debug> compile
   Compact/repair
   http://www.granite.ab.ca/access/decompile.htm

5) Use a backup (you have a lot of those -- yes?)

6) If you can identify one or a few forms or reports causing problems, copy the problem form/report from a backup.  Or copy and paste a new copy of the form/report then copy and paste the code from the old form/report into the new form/report.  If a module, copy the code, create a new module, paste the code into the new module.

7) Create a new database, use File> Get external data> Import to get all objects of the damaged database and set up the options again.

8) Try a recovery tool:
   www.officerecovery.com/access/index.htm
   www.mvps.org/access/tables/tbl0018.htm

9) Hire a company to repair the database  http://www.pksolutions.com/services.htm

Additional information:
How to Troubleshoot/Repair Damaged Jet 3.0 and Prior Databases
http://support.microsoft.com/support/kb/articles/Q109/9/53.asp

How to Troubleshoot Corruption in a Microsoft Access Database
http://support.microsoft.com/default.aspx?scid=kb;en-us;306204

Corrupt Microsoft Access MDBs FAQ
http://www.granite.ab.ca/access/corruptmdbs.htm
Chris BRetiredCommented:
Often when a second user can't open a single db, it can be solved by - going to the pc who can open it. Open Access and navigate to the db in question. click once to select, then click the drop arrow next to Open, and select Open from the list. This will remove the exclusive, at least temporarily. Best solution is to create a front for each user, and a backend to share. Generally this solves all such issues.

Chris B
Price Your IT Services for Profit

Managed service contracts are great - when they're making you money. Yes, you’re getting paid monthly, but is it actually profitable? Learn to calculate your hourly overhead burden so you can master your IT services pricing strategy.

thenelsonCommented:
Chris makes a good point.  When you get that message, is someone else using the DB?  Nico & I assumed no, Chis Assumed yes.
thenelsonCommented:
I vote for a three way split.  They are all good answers for the problem.
Chris BRetiredCommented:
Seconded

Chris B
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.