Description

Change the alias name of an McDBNode in this McDBNodes collection.

Return Type

None  

Syntax

object.Rename Index, NewName

The Rename Method syntax has these parts:

PartDescription
objectAn expression evaluating to an object of type McDBNodes.
IndexRequired. A Variant value.

The [string] name, or [long] 0-based Index of the child McDBNode to rename in this collection.

NewNameRequired. A String value.

The new name to assign to the node at Index. This name must be unique within this McDBNodes and follow the rules when assigning to an McDBNode::Name.

Remarks

CMcDBNodes collections can be thought of as collections of references (pointers) to McDBNode objects, which may or may not be proper children of the Parent of the McDBNodes collection (i.e. a symbolic link). This method allows a reference name (i.e. a symbolic link) to be changed.

Exceptions

Error Value Description
E_INVALIDARG &H80070057 NewName is not valid or Index specifies an attribute McDBNode or Index does not specify a McDBNode.
E_FAIL &H80004005 Parent of this McDBNodes is Nothing. That is, this McDBNodes does not represent a McDBNode.Children collection.
E_UNEXPECTED &H8001FFFF A framework error occured trying to rename the specified reference.

Notes

This method only works on McDBNodes collections that represent McDBNode.Children (i.e. when Parent is Not Nothing). Also note that this method only renames the alias (context) name of the target McDBNode, NEVER its native name.