May 2007
Intermediate to advanced
1152 pages
30h 53m
English
The SetPermssions method of both the Group and User objects allows you to specify the permissions a group or user has to a database object. As noted in Chapter 7, these method options are specific to MDB database files only. SetPermissions() has no effect on the Access 2007 file format (ACCDB database files).
The ObjectType option specifies the type of object to which the permission will be applied.
| Member | Value | Description |
|---|---|---|
| adPermObjColumn | 2 | A Column object. |
| adPermObjDatabase | 3 | A Database object. |
| adPermObjProcedure | 4 | A Procedure object. |
| adPermObjProviderSpecific | −1 | The object type is defined by the provider. If this value is specified, an ObjectTypeID must also be specified. |
| adPermObjTable | 1 | A Table object. |
| adPermObjView | 5 | A View object. |
The Action option specifies how the permission should be applied to the specified object.
| Member | Value | Description |
|---|---|---|
| adAccessDeny | 3 | Deny the specified permissions. |
| adAccessGrant | 1 | Grant the specified permissions. The permissions specified are added to those that have already been granted. |
| adAccessRevoke | 4 | Revoke all permissions. |
| adAccessSet | 2 | Set the specified permissions. Only the specified permissions will be in force. |
The Rights option specifies the actual rights, or permissions, for denying, granting, revoking, or setting.
| Members | Value | Description |
|---|---|---|
| adRightCreate | 16384 | The user/group has permission to create a new object of the specified type. |
| adRightDelete ... |
Read now
Unlock full access