Implementing Database Security with ADOX and JRO

In addition to managing objects and modifying the design of your database, you can use the ADOX Object Model to handle database security issues by creating user and group accounts and assigning permissions to users, groups, or both.

Use the Users and Groups collections of the ADOX Catalog object to create and manage security user accounts.

Use the GetPermissions and SetPermissions methods of the ADOX User and Group objects to retrieve and set permissions on database objects. Use the ChangePassword method of the ADOX User object to change the user's password.

Use the CompactDatabase method of the JRO JetEngine object to set a database password.

To use ADOX, you must set a reference to the Microsoft ADO Ext. 2.7 for DDL and Security Object Library (choose Tools | References in the Visual Basic application window).

To use JRO, you must set a reference to the Microsoft Jet and Replication Objects (JRO) Library (choose Tools | References in the Visual Basic application window).

The following sections of this chapter will walk you through the steps required to manage database security in your VBA procedures. You will work with objects and methods available in the Groups and Users collections in the ADOX Object Model.

0 0

Post a comment