borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (Sorting Data)Next Topic (Send email-Two Attachements) New Topic New Poll Post Reply
AndreaVB Forum : Database : password on database Solved Topic
Poster Message
pavol
Level: Sage

Registered: 11-07-2005
Posts: 68

icon password on database

hi
it turns out i have another database question (aren't those fun)
after creating the database, i needed to password protect it using code and so i tried a few things and ultimately came up with this:
Calendar.NewPassword "", "whatever"
this code i wrote after:
Set Calendar = CreateDatabase(path)
when i run this i first get a message box that tells me
Not a valid password and right after that i get an error saying -2147217843 - Automation error
Now these errors don't bother me much because when i try to open the database in MS Access (normally not through vb) it asks for a password, i type in the password that i set and the database opens up nicely with all the fields created. everything works perfectly, besides the errors
is ther a different way to create a password on my database or is it just that i am putting the code in the wrong place?
all comment appreciated

____________________________
"Intellectuals solve problems, geniuses prevent them."
-Albert Einstein

Pavol

06-02-2006 at 09:34 PM
View Profile Send Email to User Show All Posts | Quote Reply
Goran
Level: Moderator

Registered: 16-05-2002
Posts: 1681
icon Re: password on database

YOu need to specify password in the CreateDatabase method. See parameter list for CreateDatabase in MSDN.

____________________________
If you find the answer helpful, please mark this topic as solved.

07-02-2006 at 12:23 AM
View Profile Send Email to User Show All Posts | Quote Reply
pavol
Level: Sage

Registered: 11-07-2005
Posts: 68
icon Re: password on database

i checked the parameters for CreateDatabase but the only one other than the 'path' was 'options' and i have no clue what that's supposed to mean.

____________________________
"Intellectuals solve problems, geniuses prevent them."
-Albert Einstein

Pavol

23-02-2006 at 12:45 AM
View Profile Send Email to User Show All Posts | Quote Reply
pavol
Level: Sage

Registered: 11-07-2005
Posts: 68
icon Re: password on database

never mind i got it.
thanks for the help though  

____________________________
"Intellectuals solve problems, geniuses prevent them."
-Albert Einstein

Pavol

23-02-2006 at 12:21 PM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : Database : password on database Solved Topic
Previous Topic (Sorting Data)Next Topic (Send email-Two Attachements) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder