Sets or returns a value that establishes the permissions for the user or group identified by the UserName property of a CdbContainer or CdbDocument object (Microsoft Jet workspaces only).
Syntax
VOIDSetPermissions(LONG lPermissions);
LONGGetPermissions(VOID);
Parameters
Type | Example | Description |
LONG | lPermissions | A Long that contains values as listed in Remarks. |
Remarks
Use this property to establish or determine the type of read/write permission the user has for a CdbContainer or CdbDocument object.
The following tables list the valid constants for the Permissions property of various DAO objects. Unless otherwise noted, all constants shown in all tables are valid for CdbDocument objects as well.
For a CdbContainer object other than Tables and Databases containers, any of the following constants are available.
Constant | The User |
dbSecNoAccess | Does not have access to the object (not valid for Document objects). |
dbSecFullAccess | Has full access to the object. |
dbSecDelete | Can delete the object. |
dbSecReadSec | Can read the object's security-related information. |
dbSecWriteSec | Can alter access permissions. |
dbSecWriteOwner | Can change the Owner property setting. |
For a CdbContainer object for the Tables container, any of the following constants are available.
Constant | The User Can |
dbSecCreate | Create new documents (not valid for CdbDocument objects). |
dbSecReadDef | Read the table definition, including column and index information. |
dbSecWriteDef | Modify or delete the table definition, including column and index information. |
dbSecRetrieveData | Retrieve data from the CdbDocument object. |
dbSecInsertData | Add records. |
dbSecReplaceData | Modify records. |
dbSecDeleteData | Delete records. |
For a CdbContainer object for the Databases container, any of the following constants are available.
Constant | The User |
dbSecDBAdmin | Can replicate a database and change the database password (not valid for CdbDocument objects). |
dbSecDBCreate | Can create new databases. This option is valid only on the Databases container in the workgroup information file (Systen.mdw). This constant isn't valid for CdbDocument objects. |
dbSecDBExclusive | Has exclusive access to the database. |
dbSecDBOpen | Can open the database. |
Use this property to establish or determine the type of read/write permission the user has for a CdbContainer or CdbDocument object.
A CdbDocument object inherits the permissions for users from its CdbContainer object, provided the Inherit property of the CdbContainer object is set for those users or for a group to which the users belong. By setting a CdbDocument object's Permissions and UserName properties later, you can further refine the access control behavior of your object.
If you want to set or return permissions for a user that include permissions inherited from any groups to which the user belongs, use the AllPermissions property.