Commands Collection

A Command object encapsulates a user-defined command or sequence of commands that are automatically executed on the Microsoft® SQL Server™ OLAP Services client when the user accesses the cube or database. Such commands can include calculated members, named sets, library references, and so on.

Objects of each of the following ClassTypes contain a Commands collection:

Each Commands collection contains command objects of the same class type. The ContainedClassType property of a Commands collection specifies the class type of the contained objects.

CmdObject.ClassType cmdObject.Commands.ContainedClassType
clsCube clsCubeCommand
clsDatabase clsDatabaseCommand

Remarks

The relative position of commands within a Commands collection determines the order in which the commands are executed. This is important because it is possible to write commands that are dependent upon previous commands in the collection. For example, a named set can contain a previously-defined calculated member.

As with other Decision Support Objects (DSO) collections, the Add, AddNew, Find, and Remove methods of Commands collections maintain all necessary parent-child relationships among the objects in the object model.


Note The Commands collection of clsDatabase objects is reserved for future use.


See Also
About Decision Support Objects Collections
Collection Methods Collection Properties

(c) 1988-1998 Microsoft Corporation. All Rights Reserved.