change the database password (Access)

  • Thread starter Thread starter Guest
  • Start date Start date
¤ ok, ya got me, how do I change the database password via code?

You can use ExecuteNonQuery with the following:

"ALTER DATABASE PASSWORD " & "new_password" & " " & "old_password"

You will need to add the following to your connection string in order to open the database for
exclusive use (required when changing the database password):

Mode=Share Deny Read|Share Deny Write


Paul
~~~~
Microsoft MVP (Visual Basic)
 
thanks,
the part I was having trouble with was the exclusive lock
Mode=Share Deny Read|Share Deny Write
Seems to work now
 
Back
Top