System.Data.Common.DbCommand.CommandText Property

Gets or sets the text command to run against the data source.

Syntax

[System.ComponentModel.RefreshProperties(System.ComponentModel.RefreshProperties.All)]
[System.ComponentModel.DefaultValue("")]
public abstract string CommandText { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

When you set the System.Data.CommandType to StoredProcedure, you should set the DbCommand.CommandText property to the name of the stored procedure. The command executes this stored procedure when you call one of the Execute methods.

Requirements

Namespace: System.Data.Common
Assembly: System.Data (in System.Data.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0