Description

This method will set the primary McDBNode.Parent that will be matched for objects in the results of this query specification.

Return Type

None  

Syntax

object.SetParent Target

The SetParent Method syntax has these parts:

PartDescription
objectAn expression evaluating to an object of type McDBQuery.
TargetRequired. A Variant value.

A specification for the Parent of nodes returned by this McDBQuery specification. This may be any of the following:

The McDBNode.Parent McDBNode, itself.

An McDBQuery specifying a query condition that will yield the parent(s).

A string identifier that will yield a node when passed to McDBNodes.Item. This parameter allows the Parent to be specified by McDBNode.Id. As there is no context for string identifiers, these values MUST specify absolute paths (i.e. from the root) or global ids (i.e. \\<id>).

Remarks

Since this is an identity specification, there is no comparison argument (mcdbCompOp) as in the other query Set methods. The value specified by Target is ALWAYS compared on equality. To compare on inequality, the specification must first be NOTted by calling SetBoolOp().

Exceptions

Error Value Description
E_PENDING &H8000000A The database context has not been established. Call AttachDatabase().
E_INVALIDARG &H80070057 Target does not contain a valid McDBNode reference.