3
votes

I'm using an MS Access database to store data for a desktop application. This week I was asked to give access to the application to some additional users, but whenever they launch the application they are getting the error message:

Cannot open database ''. It may not be a database that your application recognizes, or the file may be corrupt.

I have gone through 5 pages of Google search results trying to find a solution and come up with nothing. Every answer I can find to this problem is either the 2GB limit (which my db is nowhere near) or corruption (which is not the case because only two new users are receiving this error and everyone else is fine).

This is my connection string:

"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=[Path];Jet OLEDB:Database Password=[Password];"

I'm pretty sure this is due to the users' machines missing something, but I cannot figure out what or where they can get it from. Please advise.

2
Where is your connection string stored? In a config file? If in a file, are you sure they have access to it? - Brian
@Brian It's not stored in a config file. Having access to the connection string is not an issue. - Jdinklage Morgoone
You have a database password, which means it is encrypted. If that was done in Access 2010 or later without "legacy encryption", and the problem users all have Access 2007, that would account for the error. - HansUp
Access drivers will be needed. - crthompson
@HansUp Thanks for the help - crthompson

2 Answers

4
votes

Your connection string indicates that you are using the Microsoft.ACE.OLEDB.12.0 driver.

This must be installed on the machine, as it doesn't come with windows.

You can find the driver in the Microsoft Access Database Engine 2010 Redistributable

1
votes

If the error is Cannot open database . It may not be a database that your application recognizes, or the file may be corrupt, make sure that the Database file (ACCDB/MDB) is not more than 2GB because that's the limit for any Access Database File.

Reference Here