using Properties("Jet OLEDB:Database Password").value = xxxxxxx opens database with no password

D

db

I am trying to restrict use to databases that have a specific password.
Everything works fine as long as a datbase is password protected. I am
storing the passwords in a hardware key. The databases are all identical
except for the different password protection. However some keys have no
password these people are allowed to open un-password protected databases. I
was hoping that if I tried to open a database that had no password after
setting Properties("Jet OLEDB:Database Password").value the open would fail,
but it does not, it opens without error.

The question - Is this normal behavior?
code:

set oCon = new adodb.connection
oCon.Provider = "Microsoft.Jet.OLEDB.4.0"
oCon.Properties("Data Source").value = "C:\something\something.mdb"
oCon.Properties("Persist Security Info").value = False
Properties("Jet OLEDB:Database Password").value = "AchYt37sK"
more settings here
oCon.Open

BTW anyone know of a good resource that describes in detail what all the
items in the Properties collection are?

TIA
DB
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top