pavol Level: Sage Registered: 11-07-2005 Posts: 68
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
|
Goran Level: Moderator Registered: 16-05-2002 Posts: 1681
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
|
pavol Level: Sage Registered: 11-07-2005 Posts: 68
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
|
pavol Level: Sage Registered: 11-07-2005 Posts: 68
Re: password on database
never mind i got it.
thanks for the help though
____________________________
"Intellectuals solve problems, geniuses prevent them."
-Albert Einstein