Description

This method will set a condition for a child node (real or symbolically linked) to be matched for objects in the result set of this query specification. (i.e. the Children property of every node in the McDBNodes result set will contain/not contain the McDBNode in Target as defined by CompOp.

Return Type

None  

Syntax

object.SetChild Target, [CompOp], [CompCount]

The SetChild Method syntax has these parts:

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

A specification for the child of nodes queried in this query specification. This parameter is specified in one of the following manners:

A McDBNode for the child node, itself.

A McDBQuery specifying a query condition that will yield the child(ren).

A string identifier that will yield a node when passed to McDBNodes.Item. This parameter allows the child to be specified by Id. However, 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>).

Nothing, indicating the query is based on the counting condition (CompCount) only (i.e. the number of Child McDBNodes).

CompOpOptional. A mcDBCompOp enumeration, as described in settings.

The comparison to the CompCount argument. For example, if this value is mcdbGTE, CompCount is 4, and Target is Nothing, then the McDBNodes result set will contain McDBNode instances that have 4 or more Children).

CompCountOptional. A Long value.

A numeric [long] value specifying the number of McDBNode instances (used with the CompOp argument) to filter the result McDBNodes.

Settings

The settings for CompOp are:

ConstantValueDescription
 mcdbEQ1

Equality (default)

 mcdbLT2

Less than

 mcdbGT4

Greater than

 mcdbGTE5

Greater than or Equal

 mcdbLTE3

Less than or Equal

 mcdbNEQ6

Not Equal

 mcdbIgnoreWildCards16

Wildcards in strings (* and ?) are interpreted as literals

 mcdbIgnoreCase32

Case of characters in strings is ignored

 mcdbIgnoreDiacritics64

Diacritics on characters in strings is ignored

 mcdbIgnoreWhiteSpace128

White space in strings is ignored

 mcdbIgnoreSymbols512

Symbols in strings are ignored

 mcdbMatchSubstring1024

The query string matches if it is a substring of the target property/attribute

 mcdbNoAttribute2048

The Named Attribute does not exist, only valid when using Empty wildcard

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.