System.Data.SqlClient.SqlDataAdapter.SelectCommand Property

Gets or sets a Transact-SQL statement or stored procedure used to select records in the data source.


[System.ComponentModel.Editor("Microsoft.VSDesigner.Data.Design.DBCommandEditor, Microsoft.VSDesigner, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
public SqlCommand SelectCommand { set; get; }


Documentation for this section has not yet been entered.


When SqlDataAdapter.SelectCommand is assigned to a previously created System.Data.SqlClient.SqlCommand, the System.Data.SqlClient.SqlCommand is not cloned. The SqlDataAdapter.SelectCommand maintains a reference to the previously created System.Data.SqlClient.SqlCommand object.

If the SqlDataAdapter.SelectCommand does not return any rows, no tables are added to the System.Data.DataSet, and no exception is raised.


Namespace: System.Data.SqlClient
Assembly: System.Data (in System.Data.dll)
Assembly Versions: 1.0.5000.0,