共用方式為


SqlDataSourceView.Select(DataSourceSelectArguments) 方法

定義

利用 SelectCommand SQL 字串及集合中 SelectParameters 的任何參數,從底層資料庫擷取資料。

public:
 System::Collections::IEnumerable ^ Select(System::Web::UI::DataSourceSelectArguments ^ arguments);
public System.Collections.IEnumerable Select(System.Web.UI.DataSourceSelectArguments arguments);
override this.Select : System.Web.UI.DataSourceSelectArguments -> System.Collections.IEnumerable
Public Function Select (arguments As DataSourceSelectArguments) As IEnumerable

參數

arguments
DataSourceSelectArguments

DataSourceSelectArguments A 用於請求資料操作,超出基本資料檢索範圍。

傳回

一份 IEnumerable 資料列清單。

例外狀況

傳給方法Select(DataSourceSelectArguments)的 API selectArgs 指定資料來源在擷取資料時應執行額外工作,以啟用分頁或排序資料,但資料來源控制不支援所請求的功能。

他們 SqlDataSource 無法與底層資料來源建立連結。

備註

該方法呼叫 SelectExecuteSelect 方法,並傳遞 selectArgs 參數。

若屬性DataSourceMode設定為 值DataSet,該方法回ExecuteSelect傳物件;若屬性設定為值DataReader,則回傳DataViewIDataReader物件DataSourceMode。 讀取完資料後關閉物件 IDataReader

適用於

另請參閱