A CdbGroup object represents a group of user accounts that have common access permissions when a CdbWorkspace object operates as a secure workgroup (Microsoft Jet workspaces only).
Remarks
You create CdbGroup objects and then use their names to establish and enforce access permissions for your databases, tables, and queries using the CdbDocument objects that represent the CdbDatabase, CdbTableDef, and CdbQueryDef objects with which you're working.
With the properties of a CdbGroup object, you can:
You can append an existing CdbGroup object to the Groups collection in a CdbUser object to establish membership of a user account in that CdbGroup object. Alternatively, you can append a CdbUser object to the Users collection in a CdbGroup object to give a user account the global permissions of that group. If you use a Groups or Users collection other than the one to which you just appended an object, you may need to use the Refresh method to refresh the collection with current information from the database.
The Microsoft Jet database engine predefines three CdbGroup objects named Admins, Users, and Guests. To create a new CdbGroup object, use the CreateGroup method on a CdbUser or CdbWorkspace object.
To refer to a CdbGroup object in a collection by its ordinal number or by its Name property setting, use either of the following syntax forms:
Groups[0]
Groups["name"]
CdbGroup Constructor Syntax
Use any one of the following three constructors. The qualifier 'CONSTRUCTOR' in the syntax models is provided to help readability. It has no syntactic value.
CONSTRUCTORCdbGroup(VOID);
This constructor creates an instance of the class. There are no parameters.
CONSTRUCTORCdbGroup(const CdbGroup &);
Type | Description |
const CdbGroup & | Reference to an object. |
This constructor creates a copy of the object referenced in the parameter.
CONSTRUCTORCdbGroup(DAOGroup *pgrp,
BOOL bAddRef = FALSE);
Type | Argument | Description |
DAOGroup * | pgrp | A DAO Automation interface pointer corresponding to this DAO class. |
BOOL | bAddRef =FALSE |
Optional. A Boolean. If TRUE, the DAO Automation interface AddRef function is called. |
DAO functionality is presented through pointers to DAO Automation interfaces. This constructor makes a DAO interface available in the form of a DAO class object that provides additional functionality.
This constructor is not required for typical use. It is provided to enable you to easily create a DAO class object if you have access to the corresponding DAO interface.
When the destructor for the DAO object is invoked, the underlying Automation interface's Release member is called. If Release decrements the interface's reference count to zero, the pointer to the Automation interface can be deleted. If you don't want this to happen (for example, because you want to discard the DAO object but continue using the Automation interface), specify TRUE for the second parameter. The underlying Automation interface's AddRef member is called, which counterbalances the eventual call to Release.