Assembly: System.Web (in System.Web.dll)
protected internal override IEnumerable ExecuteSelect( DataSourceSelectArguments arguments )
The arguments passed to the method specify that the data source should perform some additional work while retrieving data to enable paging or sorting through the retrieved data, but the data source control does not support the requested capability.
- or -
- or -
The data source cannot create a database connection.
- or -
Caching is enabled but the internal cache and command types do not match.
The SqlDataSourceView class implements the inherited method to retrieve data from a database. Page developers and data-bound control authors do not call the method directly; instead, use the publicly exposed Select method.
Before the data retrieval is performed, the OnSelecting method is called to raise the Selecting event. You can handle this event to examine the values of the parameters and to perform any preprocessing before data is retrieved.
To perform the operation, the SqlDataSourceView object builds a DbCommand object using the SelectCommand text and any associated SelectParameters, and executes it against the underlying database. After the operation completes, the OnSelected method is called to raise the Selected event. You can handle this event to examine any return values, error codes, and perform any post-processing.
The method returns a DataView object if the DataSourceMode is set to DataSet, or a IDataReader object if the DataSourceMode is set to DataReader. Close the IDataReader object when you have finished reading the data.
If the DataSourceMode is set to DataSet and caching is enabled, the SqlDataSourceView retrieves data from and saves data to the cache during the data operation. The cache is created, discarded, or refreshed based on the caching behavior specified by the combination of the CacheDuration and CacheExpirationPolicy properties.
When you are using client impersonation under Windows authentication, the data is cached when the first user accesses the data. If another user requests the same data, the data is retrieved from the cache. The data is not retrieved by making another call to the database to verify the user's access to the data. If you expect multiple users to access the data, and you want each retrieval to the data to be verified by the database's security configurations, do not use caching.
If the DataSourceMode is set to DataSet and a FilterExpression has been specified, it is evaluated along with any supplied FilterParameters and the resulting filter is applied to the list of data during the data retrieval operation.
Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.