Description

The hierachical parent of this McDBNode.

Property type

A McDBNode object.  

Syntax

[Set] object.Parent([Primary]) [= McDBNode]

The Parent Property syntax has these parts:

PartDescription
objectAn expression evaluating to an object of type McDBNode.
PrimaryOptional. A Boolean value.

Whether the McDBNode returned is the Primary (i.e. Native) Parent of this McDBNode. Through aliasing, an McDBNode instance may have more than one “Parent”. The “Relative Parent” (i.e. the McDBNode traversed to reach this McDBNode) is returned when this parameter is False or unspecified. When this parameter is True, the “Primary Parent” is returned. That is, the McDBNode in whose McDBNode.Children collection this McDBNode actually exists (as apposed to being aliased to). This distinction is relevant when McDBNodes.Remove is called, as the deletion rules are based on this association/context. When assigning to the Parent property, this parameter is unused.

McDBNodeA McDBNode object.

Remarks

McDBNode objects are organized hierarchically, each existing in the Children collection of an McDBNode Parent (except for the McDBDatabase.RootNode) and, in turn, possessing a Children collection of McDBNodes for which it is a Parent. Assigning a value to this property will move this McDBNode (and its Children) to a different location in the hierarchy. Therefore, it is not valid to assign a value to this property if this McDBNode is the McDBDatabase.RootNode.

Exceptions

Error Value Description
E_INVALIDARG &H80070057 The Parent being assigned already has a child McDBNode with the same native McDBNode::Name as this McDBNode, or the Parent being assigned is not a hierarchy McDBNode (i.e. McDBNode.IsContainer for the Parent being assigned is False).
E_FAIL &H80004005 An attempt is being made to assign a Parent to an non-hierarchy (Attribute) McDBNode.
E_ACCESSDENIED &H80070005 The McDBDatabase.LoggedUser does not have McDBRight.Write permission to this McDBNode, the new, or the existing Parent.
E_UNEXPECTED &H8001FFFF A framework error occurred while assigning the new Parent.

Notes

This property will be Nothing if this McDBNode is the McDBDatabase.RootNode or if the requested hierarchical Parent is unavailable (e.g. because of security settings). It will also be Nothing if this is an attribute McDBNode (i.e. it exists in an McDBNode.Attributes collection, not in the hierarchy).