Description

Add a category (flag) to this McDBCategories collection.

Return Type

None  

Syntax

object.Add Description

The Add Method syntax has these parts:

PartDescription
objectAn expression evaluating to an object of type McDBCategories.
DescriptionRequired. A String value.

The string name of the category to add to this collection.

Remarks

This method is context sensitive in its behavior:
McDBDatabase.Categories

The category is added to the list of those defined in the database. The Description must be unique within the McDBDatabase.

McDBType.Categories

The category is added to the list of those that will be automatically added to new nodes created with this McDBType. Adding a category in this manner has no effect on existing McDBNode instances. Before a category may be added to an McDBType, it must first exist in the McDBDatabase.Categories collection of the McDBDatabase containing the McDBType.

McDBNode.Categories

The category is added to the list of those associated with the McDBNode. Before a category may be added to a McDBNode, it must first exist in the McDBDatabase.Categories collection of the McDBDatabase containing the McDBNode.

Exceptions

Error Value Description
E_INVALIDARG &H80070057 When adding to the categories of an McDBNode or McDBType, the Description does not specify a category in the McDBDatabase. When added to an McDBDatabase, the Description specifies the name of a category that already exists.
E_UNEXPECTED &H8001FFFF A framework error occurred while modifying the McDBCategories collection.
E_ACCESSDENIED &H80070005 The McDBDatabase.LoggedUser does not have permission to write the McDBNode or McDBUser.ObjectTypeAdminRight privileges (when Add is called on an McDBType).

Notes

The category DBRoot is defined by McDBLib and is never a valid parameter to Add.