Description

Remove (and optionally delete) a named McDBAttributeType from this collection.

Return Type

None  

Syntax

object.Remove Name, [Delete]

The Remove Method syntax has these parts:

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

The name of the McDBAttributeType to remove/delete.

DeleteOptional. A Boolean value.

An optional boolean indicating if the specified McDBAttributeType should be deleted after its removal. This parameter is True by default.

Remarks

Removing an McDBAttributeType from the Attributes collection of a McDBType is always a valid operation (if the named McDBAttributeType exists in the collection and sufficient security permissions exist). However, attempting to Delete an McDBAttributeType that is still referenced by an existing Attribute on an McDBNode, is an error. Therefore, if you wish to simply remove the McDBAttributeType from the [suggested] McDBType.Attributes definition, but not delete any existing values on existing McDBNode instances, specify Delete as False in the call.

Exceptions

Error Value Description
E_UNEXPECTED &H8001FFFF A framework error occurred while accessing the McDBAttributeType.
E_ACCESSDENIED &H80070005 The McDBDatabase.LoggedUser does not have McDBAttributeType or McDBType Administration privileges (McDBRightsOwner.AttributeTypeAdminRight and McDBRightsOwner.ObjectTypeAdminRight, respectively).
CO_E_ATTEMPT_TO_CREATE_OUTSIDE_CLIENT_CONTEXT &H80004024 The argument McAttributeType is still being referenced by one or more database object(s)
E_INVALIDARG &H80070057 The Name specified does not correspond to an McDBAttributeType in this collection.