Description

Adds an McDBUser to this McDBUsers collection.

Return Type

A McDBUser object.  

Syntax

object.Add (Name, Password, Description)

The Add Method syntax has these parts:

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

The unique (within defined users and groups) name to create a new McDBUser with, or the [login] name of the McDBUser to add to the user members of the McDBGroup this McDBUsers represents. See Remarks.

PasswordRequired. A String value.

The login password to be initially assigned to the newly created McDBUser. This parameter is unused if this McDBUsers object represents the user membership of an McDBGroup.

DescriptionRequired. A String value.

A text description (full name) to associate with the new McDBUser. This argument is only used when creating a new McDBUser object (i.e. this McDBUsers represents all database users, not a group).

Remarks

The method is context sensitive.  When this McDBUsers
    object is backed by a database (i.e. represents all defined users),
    this method creates a new McDBUser object from the arguments given.
    When this McDBUsers is backed by an McDBGroup (i.e. members of a group
    object that are users), this method adds the named McDBUser, which
    must already exist, to the backing McDBGroup.  The Name parameter
    must be unique within the namespace of the context backing this
    McDBUsers object.
Note: Changing group membership can also be done using McDBGroup.AddMember().

Exceptions

Error Value Description
E_INVALIDARG &H80070057 The Name or Password provided was not valid. If this object is the user members of an McDBGroup, the named user does not exist in the McDBDatabase. If this object is the users of a database, one of these parameters is not valid (Neither may be blank).
E_ACCESSDENIED &H80070005 The McDBDatabase.LoggedUser is not a McDBRightsOwner.IsAdministrator.