|
-
Jan 16th, 2002, 06:31 PM
#1
Thread Starter
PowerPoster
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.
-
Jan 16th, 2002, 06:36 PM
#2
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
-
Jan 16th, 2002, 07:00 PM
#3
Frenzied Member
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" hehe
Mega.
"If at first you don't succeed, then skydiving is not for you"
-
Jan 16th, 2002, 07:02 PM
#4
Frenzied Member
Oops, Sorry M00dy 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
"If at first you don't succeed, then skydiving is not for you"
-
Jan 16th, 2002, 08:18 PM
#5
Thread Starter
PowerPoster
-
Jan 17th, 2002, 06:39 AM
#6
Thread Starter
PowerPoster
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.
-
Jan 17th, 2002, 06:56 AM
#7
Frenzied Member
What are you doing to trap the error?If you want, attach your code and I will sort it for you.
Last edited by Mega_Man; Jan 17th, 2002 at 06:59 AM.
"If at first you don't succeed, then skydiving is not for you"
-
Jan 17th, 2002, 08:44 AM
#8
Thread Starter
PowerPoster
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|