Description

Begin an McDBQuery condition assignment precedence level, following ordinary parenthetical precedence rules.

Return Type

None  

Syntax

object.OpenBracket

The OpenBracket Method syntax has these parts:

PartDescription
objectAn expression evaluating to an object of type McDBQuery.

Remarks

McDBQuery objects encapsulate queries that honor explicit precendence rules for operators. For example, the query: Name=<NameVal1> OR Name=<NameVal2> AND Type=<TypeVal> can be interpreted in two manners:

(Name=<NameVal1> OR Name=<NameVal2>) AND Type=<TypeVal>

or

Name=<NameVal1> OR (Name=<NameVal2> AND Type=<TypeVal>)

This method allows resolution of this ambiguity. See the Example.

Exceptions

Error Value Description
E_PENDING &H8000000A The database context has not been established. Call AttachDatabase().

Notes

It is necessary to call CloseBracket once for each call to OpenBracket, or else the McDBQuery will fail, when executed. This type of Syntax checking for the McDBQuery being formed is not done until it is executed.