I recently updated my database from .mdb (MS Access 2003) to .accdb (MS Access 2010).
With this update I also updated my provider from: Microsoft.Jet.OLEDB.4.0 to Microsoft.ACE.OLEDB.12.0
The connection works ok when I use a .accdb file without a password, but once I choose to
Encrypt with Password
I receive the following error when I try to open a connection.
Cannot open database ''. It may not be a database that your application recognizes, or the file may be corrupt.
Used connection string:
Provider=Microsoft.ACE.OLEDB.12.0;Data Source=D:\\App\\Main\\bin\\Debug\\db.xxx;
Jet OLEDB:Database Password=MyPass;
Note: I use a custom extension for my .accdb file, this was used for .mdb files without problems and I assume this should not be a problem (tested).