Description

Add a new member (McDBGroup.Item) to this McDBGroups collection

Return Type

A McDBGroup object.  

Syntax

object.Add (Name, Description)

The Add Method syntax has these parts:

PartDescription
objectAn expression evaluating to an object of type McDBGroups.
NameRequired. A String value.

This parameter is context sensitive, depending on the object owining this McDBGroups:

McDBDatabase.Groups

The unique (among McDBDatabase.Users and McDBDatabase.Groups) name for the new McDBGroup.

McDBGroup.Groups

The McDBRightsOwner.Name of the existing McDBGroup or McDBUser to add to this group.

McDBUser.Groups

The McDBRightsOwner.Name of the existing McDBGroup or McDBUser to add to this group.

This parameter is case insensitive.

DescriptionRequired. A String value.

A string description to associate with a new McDBGroup. This parameter is only used when creating a new McDBGroup object (i.e. this McDBGroups is McDBDatabase.Groups)

Remarks

This method is context sensitive. When this object is McDBDatabase.Groups, it creates a new McDBGroup object from the arguments provided. When this object is McGroup.Groups or McDBUser.Groups, this method will add Name to the group. Therefore the Name parameter must be unique within the namespace of the context backing this McDBGroups object.

Exceptions

Error Value Description
E_INVALIDARG &H80070057 Name is invalid. It either does not specify an existing McDBGroup (when group membership is being changed) or there is already a group with this name (when a group is being created).
E_ACCESSDENIED &H80070005 The McDBDatabase.LoggedUser does not have McDBRightsOwner.IsAdministrator privileges.
E_UNEXPECTED &H8001FFFF A framework error occurred while attempting to change the contents of this collection.

Notes

The Everyone group is never a valid value for Name, since no group may superset it. For this method to succeed, the McDBDatabase.LoggedUser must have McDBRightsOwner.IsAdministrator privileges.