How to Change the Database Password Programmatically?
This tutorial will teach you on how to change the database password of an Access database programmatically using visual basic 6.0.
CN.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & DatabasePath & ";Persist Security Info=False;Mode=12;Jet OLEDB:Database Password="current password here" sqlExecStr = "ALTER Database Password " & txtNewPass & " " & txtOldPass & ";" CN.Execute sqlExecStrWhere CN is your database connection variable.
If you use the database before changing the password be sure to close it by adding code like:
- Read more about How to Change the Database Password Programmatically?
- 19 comments
- Log in or register to post comments
- 498 views