Freigeben über


CommandText-Eigenschaft

Gets or sets the command to run.

Namespace:  Microsoft.AnalysisServices.AdomdClient
Assembly:  Microsoft.AnalysisServices.AdomdClient (in Microsoft.AnalysisServices.AdomdClient.dll)

Syntax

'Declaration
Public Property CommandText As String
    Get
    Set
'Usage
Dim instance As AdomdCommand
Dim value As String

value = instance.CommandText

instance.CommandText = value
public string CommandText { get; set; }
public:
virtual property String^ CommandText {
    String^ get () sealed;
    void set (String^ value) sealed;
}
abstract CommandText : string with get, set
override CommandText : string with get, set
final function get CommandText () : String
final function set CommandText (value : String)

Eigenschaftenwert

Typ: System. . :: . .String
A string that contains the command for the AdomdCommand. The default value is an empty string.

Implementiert

IDbCommand. . :: . .CommandText

Hinweise

You can use either the CommandText property or the CommandStream property to provide a command to be run by the AdomdCommand. If either both properties are set or neither property is set, then an exception is thrown when the AdomdCommand tries to run the command.

The CommandText property can take either a Multidimensional Expressions (MDX) command or an XML for Analysis compliant command (that is, a command that can be framed by the <Command> tag within an XML for Analysis request).