views:

463

answers:

2

Can anyone help me to check, whether the MS Access DB is Password protected or not before opening the DB.

Like for Excel we have "ProtectContents"readonly Boolean property in vb.net

Thank you.

A: 

I cannot such a function. If you do not want to open the data connection and trap the resultant error, you can always test for the following in the file.

From what I could research, the password is stored at location 0x42 in the mdb file. Bytes 0x42 and 0x43 seems to be set to 0xFC 0x60 in an unencrypted office 2003 mdb file. You might want to test for those two bytes before opening the file.

Francois Wolmarans
A: 

This thread appears to be related to http://stackoverflow.com/questions/380805/msaccessexe-opens-while-trying-to-release-the-object

Remou