-
password protection
I have a VB prog that reads from and writes to an mdb which is password protected. I've noticed that a non password protected version of my mdb works fine with this app.
I really would like the prog to stop if the mdb is not password protected. Any ideas on how to do this?
I assume I'd have to somehow test a prop of the mdb to see if the password is activated.
Thanks for any help.
-
try to connect without the password parameters,
if sucssesfull stop the app
if an error occures you could test for the error number(im not sure wot it would be) if it signifies password required then call your proper connect function with the password parameters
hope this helps
-
I would use 2 connection strings. One with and one without a password.
Try the one without first and make sure you handle the errors.
if you get no errors, then the connection is successful so exit the app. Obviously, you don't want to display a message like "This database is not password protected":D hehe
Mega.
-
Oops, Sorry M00dy :p Same reply
That's what happens when I open a thread and then go and watch trekky.
That's what the refresh button is for.
O well, great minds think alike :)
-
-
well, almost
Even if I trap the error, I still get the "Invalid Password" message box, so this won't work.
Any other ideas?
Thanks again.
-
What are you doing to trap the error?If you want, attach your code and I will sort it for you.
-
I was trying to set the datasource property of an adodc to the unprotected database. I got rid of that and it works fine now. Guess I got a little cut and paste crazy.
Anyway, thanks for getting me on track with this.