System.Web.UI.WebControls Namespace
.NET Framework version 2.0
Specifies whether a SqlDataSource or AccessDataSource control retrieves data as a DataReader or DataSet.
Member Name |
Description |
DataReader |
Retrieves data from the underlying data storage as an IDataReader. |
DataSet |
Retrieves data from the underlying data storage into a DataSet structure. |
The SqlDataSourceMode enumeration represents the data retrieval mode that a SqlDataSource or AccessDataSource control uses when the Select method is called.
When the DataSourceMode property is set to DataSet, data is loaded into a DataSet structure. This enables scenarios where user interface controls, such as a GridView, offer sorting and paging capabilities.
When the DataSourceMode property is set to DataReader, data is retrieved by an IDataReader object, which is a read-only, forward-only cursor.
The SqlDataSourceMode enumeration is only used to describe how the Select command retrieves data; it has no effect on other operations the SqlDataSource control performs, such as Insert, Update, or Delete.
SqlDataSource Class