CdbUser::CreateGroup Method

Creates a new Group object (Microsoft Jet workspaces only).

Syntax

CdbGroupCreateGroup(LPCTSTR pstrName=NULL,

LPCTSTR pstrPID=NULL);

Parameters

Type Example Description
LPCTSTR pstrName Optional. A pointer to a string that uniquely names the new Group object. See the Name property for details on valid Group names.
LPCTSTR pstrPID Optional. A pointer to a string containing the PID of a group account. The identifier must contain from 4 to 20 alphanumeric characters. See the PID property for more information on valid personal identifiers.

Usage

#include <afxole.h>
#include <dbdao.h>
CdbUser      us;
CdbGroup      grp;
...                           // Initialize the user, etc.
                                 // Create a group for the user.
   grp = us.CreateGroup(   _T("AccountsGrp"), _T("DEPT_501"));