共用方式為


Command Interface

[!附註]

  下一版的 Microsoft SQL Server 將不再提供此功能。請勿在新的開發工作中使用此功能,並且儘速修改使用此功能的應用程式。

In Decision Support Objects (DSO), certain objects can contain a series of user-defined commands that are automatically executed on the client when you access the object. These commands can include expressions written in Multidimensional Expressions (MDX) that define calculated members, named sets, library references, and other commands.

The objects that implement the Command interface, CubeCommand, DBCommand, and RoleCommand, have a ClassType property value of clsCubeCommand, clsDatabaseCommand, or clsRoleCommand respectively. The Command interface provides collections, methods, and properties to manipulate these objects.

Applies To:clsCubeCommand, clsDatabaseCommand, clsRoleCommand

Collections

The Command interface contains the following collection.

Collection

Description

CustomProperties

The collection of user-defined properties for the command object

Methods

The Command interface contains the following methods.

Method

Description

Clone

Copies an existing object to a target object of the same class type

LockObject

Locks an object

UnlockObject

Unlocks a previously locked object

Update

Saves the definition of the command object in the metadata repository

Properties

The Command interface supports the following properties.

Property

Description

ClassType

Returns an enumeration constant that identifies the specific class type

CommandType

Returns an enumeration constant that identifies the command's use

Description

Sets or returns the description of the command object

IsValid

Indicates whether the Name and Statement properties are empty and whether the command object belongs to a collection

Name

Sets or returns the name of the command object

OrdinalPosition

Returns the ordinal position of the command object in the Commands collection of the parent MDStore object

Parent

Returns a reference to the parent MDStore object

ParentObject

Returns a reference to the parent object of which this object is a child

Statement

Sets or returns the text of the command statement

SubClassType

Returns an enumeration constant that identifies the subclass type of the object

請參閱

概念