System.Web.UI.WebControls.SqlDataSourceMode Enumeration

Specifies whether a System.Web.UI.WebControls.SqlDataSource or System.Web.UI.WebControls.AccessDataSource control retrieves data as a System.Data.IDataReader or System.Data.DataSet.

Syntax

public enum SqlDataSourceMode

Remarks

The System.Web.UI.WebControls.SqlDataSourceMode enumeration is used by the System.Web.UI.WebControls.SqlDataSource and System.Web.UI.WebControls.AccessDataSource controls to describe the data retrieval mode that the data source control uses when the SqlDataSource.Select(System.Web.UI.DataSourceSelectArguments) method is called. When the SqlDataSource.DataSourceMode property is set to SqlDataSourceMode.DataSet, data is loaded into a System.Data.DataSet structure. This enables scenarios where user interface controls such as System.Web.UI.WebControls.GridView offer sorting and paging capabilities. When the SqlDataSource.DataSourceMode property is set to SqlDataSourceMode.DataReader, data is retrieved by an System.Data.IDataReader object, which is a read-only, forward-only cursor.

The System.Web.UI.WebControls.SqlDataSourceMode enumeration is only used to describe how the SqlDataSource.Select(System.Web.UI.DataSourceSelectArguments) command retrieves data; it has no effect on other operations the System.Web.UI.WebControls.SqlDataSource control performs, such as SqlDataSource.Insert, SqlDataSource.Update, or SqlDataSource.Delete.

Members

Member NameDescription
DataReader

Retrieves data from the underlying data storage as an System.Data.IDataReader

DataSet

Retrieves data from the underlying data storage into a System.Data.DataSet structure.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0