SqlDataSource.DataSourceMode プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > SqlDataSource.DataSourceMode プロパティの意味・解説 

SqlDataSource.DataSourceMode プロパティ

メモ : このプロパティは、.NET Framework version 2.0新しく追加されたものです。

SqlDataSource コントロールデータフェッチ使用するデータ取得モード取得または設定します

名前空間: System.Web.UI.WebControls
アセンブリ: System.Web (system.web.dll 内)
構文構文

Public Property DataSourceMode As
 SqlDataSourceMode
Dim instance As SqlDataSource
Dim value As SqlDataSourceMode

value = instance.DataSourceMode

instance.DataSourceMode = value
public SqlDataSourceMode DataSourceMode { get;
 set; }
public:
property SqlDataSourceMode DataSourceMode {
    SqlDataSourceMode get ();
    void set (SqlDataSourceMode value);
}
/** @property */
public SqlDataSourceMode get_DataSourceMode ()

/** @property */
public void set_DataSourceMode (SqlDataSourceMode
 value)
public function get DataSourceMode
 () : SqlDataSourceMode

public function set DataSourceMode
 (value : SqlDataSourceMode)

プロパティ
SqlDataSourceMode 値の 1 つ既定値DataSet です。

例外例外
例外種類条件

ArgumentOutOfRangeException

DataSourceMode プロパティSqlDataSourceMode定義されている値ではありません。

解説解説
使用例使用例

並べ替えページング、およびフィルタ処理不要な ListBox コントロール使用するシナリオ用に、SqlDataSource コントロールDataSourceMode プロパティDataReader 値に設定する方法次のコード例示します

<%@ Page language="VB" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML
 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<HTML>
  <BODY>
    <FORM runat="server">
      <asp:SqlDataSource
          id="SqlDataSource1"
          runat="server"
          DataSourceMode="DataReader"
          ConnectionString="<%$ ConnectionStrings:MyNorthwind%>"
          SelectCommand="SELECT LastName FROM Employees">
      </asp:SqlDataSource>

      <asp:ListBox
          id="ListBox1"
          runat="server"
          DataTextField="LastName"
          DataSourceID="SqlDataSource1">
      </asp:ListBox>

    </FORM>
  </BODY>
</HTML>
<%@ Page language="CS" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<HTML>
  <BODY>
    <FORM runat="server">
      <asp:SqlDataSource
          id="SqlDataSource1"
          runat="server"
          DataSourceMode="DataReader"
          ConnectionString="<%$ ConnectionStrings:MyNorthwind%>"
          SelectCommand="SELECT LastName FROM Employees">
      </asp:SqlDataSource>

      <asp:ListBox
          id="ListBox1"
          runat="server"
          DataTextField="LastName"
          DataSourceID="SqlDataSource1">
      </asp:ListBox>

    </FORM>
  </BODY>
</HTML>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<HTML>
  <BODY>
    <FORM runat="server">
      <asp:SqlDataSource
          id="SqlDataSource1"
          runat="server"
          DataSourceMode="DataReader"
          ConnectionString="Data Source=localhost;Integrated Security=SSPI;Initial
 Catalog=Northwind;"
          SelectCommand="SELECT LastName FROM Employees">
      </asp:SqlDataSource>

      <asp:ListBox
          id="ListBox1"
          runat="server"
          DataTextField="LastName"
          DataSourceID="SqlDataSource1">
      </asp:ListBox>

    </FORM>
  </BODY>
</HTML>
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
SqlDataSource クラス
SqlDataSource メンバ
System.Web.UI.WebControls 名前空間
SqlDataSourceMode


このページでは「.NET Framework クラス ライブラリ リファレンス」からSqlDataSource.DataSourceMode プロパティを検索した結果を表示しています。
Weblioに収録されているすべての辞書からSqlDataSource.DataSourceMode プロパティを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からSqlDataSource.DataSourceMode プロパティ を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「SqlDataSource.DataSourceMode プロパティ」の関連用語

SqlDataSource.DataSourceMode プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



SqlDataSource.DataSourceMode プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS