Setting the Database Password

Database security can be handled at share level or user level. Share-level security is the easiest to implement, as it only requires that you set a password on the database. You can use the ALTER DATABASE statement to set a new database password or change an existing password. The syntax looks like this:

ALTER DATABASE PASSWORD newPassword oldPassword

When setting the password for the first time, use Null for the old password (see the example procedure in Hands-On 22-1). The Access database must be opened in exclusive mode to perform password operations. Therefore, set the ADO Connection object's Mode property to adModeShareExclusive before opening a database.

0 0


  • Abeba
    How to set password on 2003 database?
    8 years ago

Post a comment