SqlDataAdapter イベント

名前 | 説明 | |
---|---|---|
![]() | Disposed | コンポーネントの Disposed イベントを待機するイベント ハンドラを追加します。 ( Component から継承されます。) |
![]() | FillError | 格納操作中にエラーが発生したときに返されます。 ( DataAdapter から継承されます。) |
![]() | RowUpdated | Update 処理中に、データ ソースに対してコマンドが実行された後に発生します。更新が試行されると、このイベントが発生します。 |
![]() | RowUpdating | Update 処理中に、データ ソースに対してコマンドが実行される前に発生します。更新が試行されると、このイベントが発生します。 |

SqlDataAdapter クラス
アセンブリ: System.Data (system.data.dll 内)

Public NotInheritable Class SqlDataAdapter Inherits DbDataAdapter Implements IDbDataAdapter, IDataAdapter, ICloneable
public ref class SqlDataAdapter sealed : public DbDataAdapter, IDbDataAdapter, IDataAdapter, ICloneable

SqlDataAdapter は、DataSet と SQL Server の間でデータを取得および保存するための、ブリッジの役割を果たします。SqlDataAdapter は、このブリッジを提供するために、データ ソースに対して適切な Transact-SQL ステートメントを使用して、DataSet 内のデータをデータ ソース内のデータと一致するように変更する Fill と、データ ソース内のデータを DataSet 内のデータと一致するように変更する Update で、割り当てを行います。
SqlDataAdapter は、DataSet にデータを読み込むときに、返されたデータを格納するテーブルおよび列が存在しない場合は、それらを作成します。ただし、MissingSchemaAction プロパティを AddWithKey に設定しない限り、暗黙的に作成されたスキーマには主キー情報は設定されません。DataSet にデータを格納する前に、FillSchema を使用して、主キー情報を含むスキーマを SqlDataAdapter に作成させることもできます。詳細については、「DataSet への既存の制約の追加」を参照してください。
SqlDataAdapter は、SQL Server データベースへの接続のパフォーマンスを向上させるために、SqlConnection および SqlCommand と組み合わせて使用します。
SqlDataAdapter には、データの読み込みと更新を効率的に行うために、SelectCommand、InsertCommand、DeleteCommand、UpdateCommand、TableMappings の各プロパティも用意されています。
SqlDataAdapter のインスタンスを作成すると、読み書き可能プロパティが初期値に設定されます。これらの初期値の一覧については、SqlDataAdapter コンストラクタのトピックを参照してください。
Topic | Location |
---|---|
チュートリアル : TreeView コントロールでの階層データの表示 | Visual Studio での ASP .NET Web アプリケーションの作成 |

SqlCommand、SqlDataAdapter、および SqlConnection を使用して、データベースからレコードを選択し、選択した行を DataSet に格納する例を次に示します。次に、格納された DataSet が返されます。そのために、初期化された DataSet、接続文字列、および Transact-SQL SELECT ステートメントのクエリ文字列がメソッドに渡されます。
Public Function SelectRows( _ ByVal dataSet As DataSet, ByVal connectionString As String, _ ByVal queryString As String) As DataSet Using connection As New SqlConnection(connectionString) Dim adapter As New SqlDataAdapter() adapter.SelectCommand = New SqlCommand( _ queryString, connection) adapter.Fill(dataSet) Return dataSet End Using End Function
private static DataSet SelectRows(DataSet dataset , string connectionString,string queryString) { using (SqlConnection connection = new SqlConnection(connectionString)) { SqlDataAdapter adapter = new SqlDataAdapter(); adapter.SelectCommand = new SqlCommand( queryString, connection); adapter.Fill(dataset); return dataset; } }

System.MarshalByRefObject
System.ComponentModel.Component
System.Data.Common.DataAdapter
System.Data.Common.DbDataAdapter
System.Data.SqlClient.SqlDataAdapter


Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


SqlDataAdapter コンストラクタ ()
アセンブリ: System.Data (system.data.dll 内)


SqlDataAdapter のインスタンスを作成すると、次のように各読み書き可能プロパティが初期値に設定されます。
MissingMappingAction | MissingMappingAction.Passthrough |
MissingSchemaAction | MissingSchemaAction.Add |

SqlDataAdapter を作成し、そのプロパティの一部を設定する例を次に示します。
Public Function CreateSqlDataAdapter(ByVal connection As SqlConnection) As SqlDataAdapter Dim adapter As SqlDataAdapter = New SqlDataAdapter adapter.MissingSchemaAction = MissingSchemaAction.AddWithKey ' Create the commands. adapter.SelectCommand = New SqlCommand( _ "SELECT CustomerID, CompanyName FROM CUSTOMERS", connection) adapter.InsertCommand = New SqlCommand( _ "INSERT INTO Customers (CustomerID, CompanyName) " & _ "VALUES (@CustomerID, @CompanyName)", connection) adapter.UpdateCommand = New SqlCommand( _ "UPDATE Customers SET CustomerID = @CustomerID, CompanyName = @CompanyName " & _ "WHERE CustomerID = @oldCustomerID", connection) adapter.DeleteCommand = New SqlCommand( _ "DELETE FROM Customers WHERE CustomerID = @CustomerID", connection) ' Create the parameters. adapter.InsertCommand.Parameters.Add("@CustomerID", _ SqlDbType.Char, 5, "CustomerID") adapter.InsertCommand.Parameters.Add("@CompanyName", _ SqlDbType.VarChar, 40, "CompanyName") adapter.UpdateCommand.Parameters.Add("@CustomerID", _ SqlDbType.Char, 5, "CustomerID") adapter.UpdateCommand.Parameters.Add("@CompanyName", _ SqlDbType.VarChar, 40, "CompanyName") adapter.UpdateCommand.Parameters.Add("@oldCustomerID", _ SqlDbType.Char, 5, "CustomerID").SourceVersion = DataRowVersion.Original adapter.DeleteCommand.Parameters.Add("@CustomerID", _ SqlDbType.Char, 5, "CustomerID").SourceVersion = DataRowVersion.Original Return adapter End Function
public static SqlDataAdapter CreateSqlDataAdapter(SqlConnection connection) { SqlDataAdapter adapter = new SqlDataAdapter(); adapter.MissingSchemaAction = MissingSchemaAction.AddWithKey; // Create the commands. adapter.SelectCommand = new SqlCommand( "SELECT CustomerID, CompanyName FROM CUSTOMERS", connection); adapter.InsertCommand = new SqlCommand( "INSERT INTO Customers (CustomerID, CompanyName) " + "VALUES (@CustomerID, @CompanyName)", connection); adapter.UpdateCommand = new SqlCommand( "UPDATE Customers SET CustomerID = @CustomerID, CompanyName = @CompanyName " + "WHERE CustomerID = @oldCustomerID", connection); adapter.DeleteCommand = new SqlCommand( "DELETE FROM Customers WHERE CustomerID = @CustomerID", connection); // Create the parameters. adapter.InsertCommand.Parameters.Add("@CustomerID", SqlDbType.Char, 5, "CustomerID"); adapter.InsertCommand.Parameters.Add("@CompanyName", SqlDbType.VarChar, 40, "CompanyName"); adapter.UpdateCommand.Parameters.Add("@CustomerID", SqlDbType.Char, 5, "CustomerID"); adapter.UpdateCommand.Parameters.Add("@CompanyName", SqlDbType.VarChar, 40, "CompanyName"); adapter.UpdateCommand.Parameters.Add("@oldCustomerID", SqlDbType.Char, 5, "CustomerID").SourceVersion = DataRowVersion.Original; adapter.DeleteCommand.Parameters.Add("@CustomerID", SqlDbType.Char, 5, "CustomerID").SourceVersion = DataRowVersion.Original; return adapter; }

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


SqlDataAdapter コンストラクタ (SqlCommand)
アセンブリ: System.Data (system.data.dll 内)

- selectCommand
Transact-SQL SELECT ステートメントまたはストアド プロシージャである SqlCommand。SqlDataAdapter の SelectCommand プロパティとして設定されます。

SqlDataAdapter コンストラクタの実装により、SelectCommand プロパティを selectCommand パラメータで指定した値に設定します。
SqlDataAdapter のインスタンスを作成すると、次のように各読み書き可能プロパティが初期値に設定されます。
MissingMappingAction | MissingMappingAction.Passthrough |
MissingSchemaAction | MissingSchemaAction.Add |
これらのプロパティの値は、各プロパティを個別に呼び出して変更できます。
作成済みの SqlCommand に SelectCommand またはその他のいずれかのコマンド プロパティが割り当てられた場合、SqlCommand のクローンは作成されません。SelectCommand によって、作成済みの SqlCommand オブジェクトへの参照が維持されます。

SqlDataAdapter を作成し、そのプロパティの一部を設定する例を次に示します。
Public Function CreateSqlDataAdapter(ByVal selectCommand As SqlCommand, _ ByVal connection As SqlConnection) As SqlDataAdapter Dim adapter As SqlDataAdapter = New SqlDataAdapter(selectCommand) adapter.MissingSchemaAction = MissingSchemaAction.AddWithKey ' Create the commands. adapter.InsertCommand = New SqlCommand( _ "INSERT INTO Customers (CustomerID, CompanyName) " & _ "VALUES (@CustomerID, @CompanyName)", connection) adapter.UpdateCommand = New SqlCommand( _ "UPDATE Customers SET CustomerID = @CustomerID, CompanyName = @CompanyName " & _ "WHERE CustomerID = @oldCustomerID", connection) adapter.DeleteCommand = New SqlCommand( _ "DELETE FROM Customers WHERE CustomerID = @CustomerID", connection) ' Create the parameters. adapter.InsertCommand.Parameters.Add("@CustomerID", _ SqlDbType.Char, 5, "CustomerID") adapter.InsertCommand.Parameters.Add("@CompanyName", _ SqlDbType.VarChar, 40, "CompanyName") adapter.UpdateCommand.Parameters.Add("@CustomerID", _ SqlDbType.Char, 5, "CustomerID") adapter.UpdateCommand.Parameters.Add("@CompanyName", _ SqlDbType.VarChar, 40, "CompanyName") adapter.UpdateCommand.Parameters.Add("@oldCustomerID", _ SqlDbType.Char, 5, "CustomerID").SourceVersion = DataRowVersion.Original adapter.DeleteCommand.Parameters.Add("@CustomerID", _ SqlDbType.Char, 5, "CustomerID").SourceVersion = DataRowVersion.Original Return adapter End Function
public static SqlDataAdapter CreateSqlDataAdapter(SqlCommand selectCommand, SqlConnection connection) { SqlDataAdapter adapter = new SqlDataAdapter(selectCommand); adapter.MissingSchemaAction = MissingSchemaAction.AddWithKey; // Create the other commands. adapter.InsertCommand = new SqlCommand( "INSERT INTO Customers (CustomerID, CompanyName) " + "VALUES (@CustomerID, @CompanyName)", connection); adapter.UpdateCommand = new SqlCommand( "UPDATE Customers SET CustomerID = @CustomerID, CompanyName = @CompanyName " + "WHERE CustomerID = @oldCustomerID", connection); adapter.DeleteCommand = new SqlCommand( "DELETE FROM Customers WHERE CustomerID = @CustomerID", connection); // Create the parameters. adapter.InsertCommand.Parameters.Add("@CustomerID", SqlDbType.Char, 5, "CustomerID"); adapter.InsertCommand.Parameters.Add("@CompanyName", SqlDbType.VarChar, 40, "CompanyName"); adapter.UpdateCommand.Parameters.Add("@CustomerID", SqlDbType.Char, 5, "CustomerID"); adapter.UpdateCommand.Parameters.Add("@CompanyName", SqlDbType.VarChar, 40, "CompanyName"); adapter.UpdateCommand.Parameters.Add("@oldCustomerID", SqlDbType.Char, 5, "CustomerID").SourceVersion = DataRowVersion.Original; adapter.DeleteCommand.Parameters.Add("@CustomerID", SqlDbType.Char, 5, "CustomerID").SourceVersion = DataRowVersion.Original; return adapter; }

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


SqlDataAdapter コンストラクタ (String, SqlConnection)
アセンブリ: System.Data (system.data.dll 内)

Dim selectCommandText As String Dim selectConnection As SqlConnection Dim instance As New SqlDataAdapter(selectCommandText, selectConnection)
- selectCommandText
Transact-SQL SELECT ステートメントまたはストアド プロシージャである String。SqlDataAdapter の SelectCommand プロパティによって使用されます。
- selectConnection
接続を表す SqlConnection。

SqlDataAdapter の実装では、SqlConnection が開いていない場合は、接続が開かれ、再び閉じられます。これは、アプリケーションで複数の SqlDataAdapter オブジェクトの Fill メソッドを呼び出す必要がある場合に効果的です。SqlConnection が既に開いている場合、その接続を閉じるには、明示的に Close または Dispose を呼び出す必要があります。
SqlDataAdapter のインスタンスを作成すると、次のように各読み書き可能プロパティが初期値に設定されます。
MissingMappingAction | MissingMappingAction.Passthrough |
MissingSchemaAction | MissingSchemaAction.Add |

SqlDataAdapter を作成し、そのプロパティの一部を設定する例を次に示します。
Public Function CreateSqlDataAdapter(ByVal commandText As String, _ ByVal connection As SqlConnection) As SqlDataAdapter Dim adapter As SqlDataAdapter = New SqlDataAdapter(commandText, connection) adapter.MissingSchemaAction = MissingSchemaAction.AddWithKey ' Create the commands. adapter.InsertCommand = New SqlCommand( _ "INSERT INTO Customers (CustomerID, CompanyName) " & _ "VALUES (@CustomerID, @CompanyName)") adapter.UpdateCommand = New SqlCommand( _ "UPDATE Customers SET CustomerID = @CustomerID, CompanyName = @CompanyName " & _ "WHERE CustomerID = @oldCustomerID") adapter.DeleteCommand = New SqlCommand( _ "DELETE FROM Customers WHERE CustomerID = @CustomerID") ' Create the parameters. adapter.InsertCommand.Parameters.Add("@CustomerID", _ SqlDbType.Char, 5, "CustomerID") adapter.InsertCommand.Parameters.Add("@CompanyName", _ SqlDbType.VarChar, 40, "CompanyName") adapter.UpdateCommand.Parameters.Add("@CustomerID", _ SqlDbType.Char, 5, "CustomerID") adapter.UpdateCommand.Parameters.Add("@CompanyName", _ SqlDbType.VarChar, 40, "CompanyName") adapter.UpdateCommand.Parameters.Add("@oldCustomerID", _ SqlDbType.Char, 5, "CustomerID").SourceVersion = DataRowVersion.Original adapter.DeleteCommand.Parameters.Add("@CustomerID", _ SqlDbType.Char, 5, "CustomerID").SourceVersion = DataRowVersion.Original Return adapter End Function
public static SqlDataAdapter CreateSqlDataAdapter(string commandText, SqlConnection connection) { SqlDataAdapter adapter = new SqlDataAdapter(commandText, connection); adapter.MissingSchemaAction = MissingSchemaAction.AddWithKey; // Create the other commands. adapter.InsertCommand = new SqlCommand( "INSERT INTO Customers (CustomerID, CompanyName) " + "VALUES (@CustomerID, @CompanyName)"); adapter.UpdateCommand = new SqlCommand( "UPDATE Customers SET CustomerID = @CustomerID, CompanyName = @CompanyName " + "WHERE CustomerID = @oldCustomerID"); adapter.DeleteCommand = new SqlCommand( "DELETE FROM Customers WHERE CustomerID = @CustomerID"); // Create the parameters. adapter.InsertCommand.Parameters.Add("@CustomerID", SqlDbType.Char, 5, "CustomerID"); adapter.InsertCommand.Parameters.Add("@CompanyName", SqlDbType.VarChar, 40, "CompanyName"); adapter.UpdateCommand.Parameters.Add("@CustomerID", SqlDbType.Char, 5, "CustomerID"); adapter.UpdateCommand.Parameters.Add("@CompanyName", SqlDbType.VarChar, 40, "CompanyName"); adapter.UpdateCommand.Parameters.Add("@oldCustomerID", SqlDbType.Char, 5, "CustomerID").SourceVersion = DataRowVersion.Original; adapter.DeleteCommand.Parameters.Add("@CustomerID", SqlDbType.Char, 5, "CustomerID").SourceVersion = DataRowVersion.Original; return adapter; }

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


SqlDataAdapter コンストラクタ

名前 | 説明 |
---|---|
SqlDataAdapter () | SqlDataAdapter クラスの新しいインスタンスを初期化します。 .NET Compact Framework によってサポートされています。 |
SqlDataAdapter (SqlCommand) | SelectCommand プロパティとして SqlCommand を指定して、SqlDataAdapter クラスの新しいインスタンスを初期化します。 .NET Compact Framework によってサポートされています。 |
SqlDataAdapter (String, SqlConnection) | SelectCommand オブジェクトと SqlConnection オブジェクトを指定して、SqlDataAdapter クラスの新しいインスタンスを初期化します。 .NET Compact Framework によってサポートされています。 |
SqlDataAdapter (String, String) | SelectCommand と接続文字列を指定して、SqlDataAdapter クラスの新しいインスタンスを初期化します。 .NET Compact Framework によってサポートされています。 |

関連項目
SqlDataAdapter クラスSqlDataAdapter メンバ
System.Data.SqlClient 名前空間
その他の技術情報
ADO.NET でのデータの変更.NET Framework Data Provider for SQL Server の使用
SqlDataAdapter コンストラクタ (String, String)
アセンブリ: System.Data (system.data.dll 内)

Dim selectCommandText As String Dim selectConnectionString As String Dim instance As New SqlDataAdapter(selectCommandText, selectConnectionString)
- selectCommandText
Transact-SQL SELECT ステートメントまたはストアド プロシージャである String。SqlDataAdapter の SelectCommand プロパティによって使用されます。

SqlDataAdapter コンストラクタのこのオーバーロードでは、selectCommandText パラメータを使用して SelectCommand プロパティを設定します。SqlDataAdapter は、selectConnectionString パラメータを使用して接続を作成および維持します。
SqlDataAdapter のインスタンスを作成すると、次のように各読み書き可能プロパティが初期値に設定されます。
MissingMappingAction | MissingMappingAction.Passthrough |
MissingSchemaAction | MissingSchemaAction.Add |

SqlDataAdapter を作成し、そのプロパティの一部を設定する例を次に示します。
Public Function CreateSqlDataAdapter(ByVal commandText As String, _ ByVal connectionString As String) As SqlDataAdapter Dim adapter As SqlDataAdapter = New SqlDataAdapter(commandText, connectionString) Dim connection As SqlConnection = adapter.SelectCommand.Connection adapter.MissingSchemaAction = MissingSchemaAction.AddWithKey ' Create the commands. adapter.InsertCommand = New SqlCommand( _ "INSERT INTO Customers (CustomerID, CompanyName) " & _ "VALUES (@CustomerID, @CompanyName)", connection) adapter.UpdateCommand = New SqlCommand( _ "UPDATE Customers SET CustomerID = @CustomerID, CompanyName = @CompanyName " & _ "WHERE CustomerID = @oldCustomerID", connection) adapter.DeleteCommand = New SqlCommand( _ "DELETE FROM Customers WHERE CustomerID = @CustomerID", connection) ' Create the parameters. adapter.InsertCommand.Parameters.Add("@CustomerID", _ SqlDbType.Char, 5, "CustomerID") adapter.InsertCommand.Parameters.Add("@CompanyName", _ SqlDbType.VarChar, 40, "CompanyName") adapter.UpdateCommand.Parameters.Add("@CustomerID", _ SqlDbType.Char, 5, "CustomerID") adapter.UpdateCommand.Parameters.Add("@CompanyName", _ SqlDbType.VarChar, 40, "CompanyName") adapter.UpdateCommand.Parameters.Add("@oldCustomerID", _ SqlDbType.Char, 5, "CustomerID").SourceVersion = DataRowVersion.Original adapter.DeleteCommand.Parameters.Add("@CustomerID", _ SqlDbType.Char, 5, "CustomerID").SourceVersion = DataRowVersion.Original Return adapter End Function
public static SqlDataAdapter CreateSqlDataAdapter(string commandText, string connectionString) { SqlDataAdapter adapter = new SqlDataAdapter(commandText, connectionString); SqlConnection connection = adapter.SelectCommand.Connection; adapter.MissingSchemaAction = MissingSchemaAction.AddWithKey; // Create the commands. adapter.InsertCommand = new SqlCommand( "INSERT INTO Customers (CustomerID, CompanyName) " + "VALUES (@CustomerID, @CompanyName)", connection); adapter.UpdateCommand = new SqlCommand( "UPDATE Customers SET CustomerID = @CustomerID, CompanyName = @CompanyName " + "WHERE CustomerID = @oldCustomerID", connection); adapter.DeleteCommand = new SqlCommand( "DELETE FROM Customers WHERE CustomerID = @CustomerID", connection); // Create the parameters. adapter.InsertCommand.Parameters.Add("@CustomerID", SqlDbType.Char, 5, "CustomerID"); adapter.InsertCommand.Parameters.Add("@CompanyName", SqlDbType.VarChar, 40, "CompanyName"); adapter.UpdateCommand.Parameters.Add("@CustomerID", SqlDbType.Char, 5, "CustomerID"); adapter.UpdateCommand.Parameters.Add("@CompanyName", SqlDbType.VarChar, 40, "CompanyName"); adapter.UpdateCommand.Parameters.Add("@oldCustomerID", SqlDbType.Char, 5, "CustomerID").SourceVersion = DataRowVersion.Original; adapter.DeleteCommand.Parameters.Add("@CustomerID", SqlDbType.Char, 5, "CustomerID").SourceVersion = DataRowVersion.Original; return adapter; }

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


SqlDataAdapter プロパティ

名前 | 説明 | |
---|---|---|
![]() | AcceptChangesDuringFill | Fill 操作中に DataTable に DataRow が追加された後で、その行に対して AcceptChanges を呼び出すかどうかを示す値を取得または設定します。 ( DataAdapter から継承されます。) |
![]() | AcceptChangesDuringUpdate | Update で AcceptChanges が呼び出されるかどうかを取得または設定します。 ( DataAdapter から継承されます。) |
![]() | Container | Component を格納している IContainer を取得します。 ( Component から継承されます。) |
![]() | ContinueUpdateOnError | 行の更新中にエラーが発生したときに、例外を生成するかどうかを指定する値を取得または設定します。 ( DataAdapter から継承されます。) |
![]() | FillLoadOption | アダプタが DbDataReader から DataTable にデータを読み込む方法を決定する LoadOption を取得または設定します。 ( DataAdapter から継承されます。) |
![]() | MissingMappingAction | 一致するテーブルまたは列が受信データに含まれていない場合に実行するアクションを決定します。 ( DataAdapter から継承されます。) |
![]() | MissingSchemaAction | 既存の DataSet スキーマが受信データと一致しないときに実行するアクションを決定します。 ( DataAdapter から継承されます。) |
![]() | ReturnProviderSpecificTypes | Fill メソッドがプロバイダ固有の値、または共通の CLS 準拠の値のどちらを返すかを取得または設定します。 ( DataAdapter から継承されます。) |
![]() | Site | Component の ISite を取得または設定します。 ( Component から継承されます。) |
![]() | TableMappings | ソース テーブルと DataTable との間のマスター マップを提供するコレクションを取得します。 ( DataAdapter から継承されます。) |
![]() | UpdateCommand | データ ソース内のレコードを更新するための Transact-SQL ステートメントまたはストアド プロシージャを取得または設定します。 |

名前 | 説明 | |
---|---|---|
![]() | CanRaiseEvents | コンポーネントがイベントを発生させることがきるかどうかを示す値を取得します。 ( Component から継承されます。) |
![]() | DesignMode | Component が現在デザイン モードかどうかを示す値を取得します。 ( Component から継承されます。) |
![]() | Events | Component に結び付けられているイベント ハンドラのリストを取得します。 ( Component から継承されます。) |
![]() | FillCommandBehavior | データ アダプタにデータを読み込むコマンドの動作を取得または設定します。 ( DbDataAdapter から継承されます。) |


SqlDataAdapter メソッド

名前 | 説明 | |
---|---|---|
![]() | CreateObjRef | リモート オブジェクトとの通信に使用するプロキシの生成に必要な情報をすべて格納しているオブジェクトを作成します。 ( MarshalByRefObject から継承されます。) |
![]() | Dispose | オーバーロードされます。 Component によって使用されているリソースを解放します。 ( Component から継承されます。) |
![]() | Equals | オーバーロードされます。 2 つの Object インスタンスが等しいかどうかを判断します。 ( Object から継承されます。) |
![]() | Fill | オーバーロードされます。 DataSet または DataTable にデータを読み込みます。 ( DbDataAdapter から継承されます。) |
![]() | FillSchema | オーバーロードされます。 DataTable を DataSet に追加し、データ ソース内のスキーマと一致するようにスキーマを設定します。 ( DbDataAdapter から継承されます。) |
![]() | GetFillParameters | SQL SELECT ステートメントの実行時にユーザーが設定したパラメータを取得します。 ( DbDataAdapter から継承されます。) |
![]() | GetHashCode | 特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用に適しています。 ( Object から継承されます。) |
![]() | GetLifetimeService | 対象のインスタンスの有効期間ポリシーを制御する、現在の有効期間サービス オブジェクトを取得します。 ( MarshalByRefObject から継承されます。) |
![]() | GetType | 現在のインスタンスの Type を取得します。 ( Object から継承されます。) |
![]() | InitializeLifetimeService | 対象のインスタンスの有効期間ポリシーを制御する、有効期間サービス オブジェクトを取得します。 ( MarshalByRefObject から継承されます。) |
![]() | ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 ( Object から継承されます。) |
![]() | ResetFillLoadOption | FillLoadOption を既定の状態にリセットし、Fill で AcceptChangesDuringFill を受け入れるようにします。 ( DataAdapter から継承されます。) |
![]() | ShouldSerializeAcceptChangesDuringFill | AcceptChangesDuringFill プロパティを永続化する必要があるかどうかを決定します。 ( DataAdapter から継承されます。) |
![]() | ShouldSerializeFillLoadOption | FillLoadOption プロパティを永続化する必要があるかどうかを決定します。 ( DataAdapter から継承されます。) |
![]() | ToString | Component の名前を格納している String を返します (存在する場合)。このメソッドはオーバーライドできません。 ( Component から継承されます。) |
![]() | Update | オーバーロードされます。 DataSet 内の挿入行、更新行、または削除行に対して、INSERT、UPDATE、または DELETE ステートメントを個別に呼び出します。 ( DbDataAdapter から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | AddToBatch | IDbCommand を現在のバッチに追加します。 ( DbDataAdapter から継承されます。) |
![]() | ClearBatch | バッチからすべての IDbCommand オブジェクトを削除します。 ( DbDataAdapter から継承されます。) |
![]() | CloneInternals | この DataAdapter のインスタンスのコピーを作成します。 ( DataAdapter から継承されます。) |
![]() | CreateRowUpdatedEvent | RowUpdatedEventArgs クラスの新しいインスタンスを初期化します。 ( DbDataAdapter から継承されます。) |
![]() | CreateRowUpdatingEvent | RowUpdatingEventArgs クラスの新しいインスタンスを初期化します。 ( DbDataAdapter から継承されます。) |
![]() | CreateTableMappings | 新しい DataTableMappingCollection を作成します。 ( DataAdapter から継承されます。) |
![]() | Dispose | オーバーロードされます。 Component によって使用されているリソースを解放します。 ( Component から継承されます。) |
![]() | ExecuteBatch | 現在のバッチを実行します。 ( DbDataAdapter から継承されます。) |
![]() | Fill | オーバーロードされます。 DataSet または DataTable にデータを読み込みます。 ( DbDataAdapter から継承されます。) |
![]() | FillSchema | オーバーロードされます。 DataTable を DataSet に追加し、データ ソース内のスキーマと一致するようにスキーマを設定します。 ( DbDataAdapter から継承されます。) |
![]() | Finalize | Component がガベージ コレクションによってクリアされる前に、アンマネージ リソースを解放し、その他のクリーンアップ操作を実行します。 ( Component から継承されます。) |
![]() | GetBatchedParameter | 現在のバッチのコマンドの 1 つから IDataParameter を返します。 ( DbDataAdapter から継承されます。) |
![]() | GetService | Component またはその Container で提供されるサービスを表すオブジェクトを返します。 ( Component から継承されます。) |
![]() | HasTableMappings | DataTableMappingCollection が作成されているかどうかを示します。 ( DataAdapter から継承されます。) |
![]() | InitializeBatching | DbDataAdapter のバッチ処理を初期化します。 ( DbDataAdapter から継承されます。) |
![]() | MemberwiseClone | オーバーロードされます。 ( MarshalByRefObject から継承されます。) |
![]() | OnFillError | Fill 中にエラーが発生したときに呼び出されます。 ( DataAdapter から継承されます。) |
![]() | OnRowUpdated | .NET Framework データ プロバイダの RowUpdated イベントを発生させます。 ( DbDataAdapter から継承されます。) |
![]() | OnRowUpdating | .NET Framework データ プロバイダの RowUpdating イベントを発生させます。 ( DbDataAdapter から継承されます。) |
![]() | ShouldSerializeTableMappings | 1 つ以上の DataTableMapping オブジェクトが存在し、それらを永続化する必要があるかどうかを確認します。 ( DataAdapter から継承されます。) |
![]() | TerminateBatching | DbDataAdapter のバッチ処理を終了します。 ( DbDataAdapter から継承されます。) |
![]() | Update | オーバーロードされます。 DataSet 内の挿入行、更新行、または削除行に対して、INSERT、UPDATE、または DELETE ステートメントを個別に呼び出します。 ( DbDataAdapter から継承されます。) |


SqlDataAdapter メンバ
DataSet へのデータの格納および SQL Server データベースの更新に使用される、一連のデータ コマンドおよびデータベース接続を表します。このクラスは継承できません。
SqlDataAdapter データ型で公開されるメンバを以下の表に示します。


名前 | 説明 | |
---|---|---|
![]() | AcceptChangesDuringFill | Fill 操作中に DataTable に DataRow が追加された後で、その行に対して AcceptChanges を呼び出すかどうかを示す値を取得または設定します。(DataAdapter から継承されます。) |
![]() | AcceptChangesDuringUpdate | Update で AcceptChanges が呼び出されるかどうかを取得または設定します。(DataAdapter から継承されます。) |
![]() | Container | Component を格納している IContainer を取得します。(Component から継承されます。) |
![]() | ContinueUpdateOnError | 行の更新中にエラーが発生したときに、例外を生成するかどうかを指定する値を取得または設定します。(DataAdapter から継承されます。) |
![]() | FillLoadOption | アダプタが DbDataReader から DataTable にデータを読み込む方法を決定する LoadOption を取得または設定します。(DataAdapter から継承されます。) |
![]() | MissingMappingAction | 一致するテーブルまたは列が受信データに含まれていない場合に実行するアクションを決定します。(DataAdapter から継承されます。) |
![]() | MissingSchemaAction | 既存の DataSet スキーマが受信データと一致しないときに実行するアクションを決定します。(DataAdapter から継承されます。) |
![]() | ReturnProviderSpecificTypes | Fill メソッドがプロバイダ固有の値、または共通の CLS 準拠の値のどちらを返すかを取得または設定します。(DataAdapter から継承されます。) |
![]() | Site | Component の ISite を取得または設定します。(Component から継承されます。) |
![]() | TableMappings | ソース テーブルと DataTable との間のマスター マップを提供するコレクションを取得します。(DataAdapter から継承されます。) |
![]() | UpdateCommand | データ ソース内のレコードを更新するための Transact-SQL ステートメントまたはストアド プロシージャを取得または設定します。 |

名前 | 説明 | |
---|---|---|
![]() | CanRaiseEvents | コンポーネントがイベントを発生させることがきるかどうかを示す値を取得します。(Component から継承されます。) |
![]() | DesignMode | Component が現在デザイン モードかどうかを示す値を取得します。(Component から継承されます。) |
![]() | Events | Component に結び付けられているイベント ハンドラのリストを取得します。(Component から継承されます。) |
![]() | FillCommandBehavior | データ アダプタにデータを読み込むコマンドの動作を取得または設定します。(DbDataAdapter から継承されます。) |


名前 | 説明 | |
---|---|---|
![]() | AddToBatch | IDbCommand を現在のバッチに追加します。 (DbDataAdapter から継承されます。) |
![]() | ClearBatch | バッチからすべての IDbCommand オブジェクトを削除します。 (DbDataAdapter から継承されます。) |
![]() | CloneInternals | この DataAdapter のインスタンスのコピーを作成します。 (DataAdapter から継承されます。) |
![]() | CreateRowUpdatedEvent | RowUpdatedEventArgs クラスの新しいインスタンスを初期化します。 (DbDataAdapter から継承されます。) |
![]() | CreateRowUpdatingEvent | RowUpdatingEventArgs クラスの新しいインスタンスを初期化します。 (DbDataAdapter から継承されます。) |
![]() | CreateTableMappings | 新しい DataTableMappingCollection を作成します。 (DataAdapter から継承されます。) |
![]() | Dispose | オーバーロードされます。 Component によって使用されているリソースを解放します。 (Component から継承されます。) |
![]() | ExecuteBatch | 現在のバッチを実行します。 (DbDataAdapter から継承されます。) |
![]() | Fill | オーバーロードされます。 DataSet または DataTable にデータを読み込みます。 (DbDataAdapter から継承されます。) |
![]() | FillSchema | オーバーロードされます。 DataTable を DataSet に追加し、データ ソース内のスキーマと一致するようにスキーマを設定します。 (DbDataAdapter から継承されます。) |
![]() | Finalize | Component がガベージ コレクションによってクリアされる前に、アンマネージ リソースを解放し、その他のクリーンアップ操作を実行します。 (Component から継承されます。) |
![]() | GetBatchedParameter | 現在のバッチのコマンドの 1 つから IDataParameter を返します。 (DbDataAdapter から継承されます。) |
![]() | GetService | Component またはその Container で提供されるサービスを表すオブジェクトを返します。 (Component から継承されます。) |
![]() | HasTableMappings | DataTableMappingCollection が作成されているかどうかを示します。 (DataAdapter から継承されます。) |
![]() | InitializeBatching | DbDataAdapter のバッチ処理を初期化します。 (DbDataAdapter から継承されます。) |
![]() | MemberwiseClone | オーバーロードされます。 ( MarshalByRefObject から継承されます。) |
![]() | OnFillError | Fill 中にエラーが発生したときに呼び出されます。 (DataAdapter から継承されます。) |
![]() | OnRowUpdated | .NET Framework データ プロバイダの RowUpdated イベントを発生させます。 (DbDataAdapter から継承されます。) |
![]() | OnRowUpdating | .NET Framework データ プロバイダの RowUpdating イベントを発生させます。 (DbDataAdapter から継承されます。) |
![]() | ShouldSerializeTableMappings | 1 つ以上の DataTableMapping オブジェクトが存在し、それらを永続化する必要があるかどうかを確認します。 (DataAdapter から継承されます。) |
![]() | TerminateBatching | DbDataAdapter のバッチ処理を終了します。 (DbDataAdapter から継承されます。) |
![]() | Update | オーバーロードされます。 DataSet 内の挿入行、更新行、または削除行に対して、INSERT、UPDATE、または DELETE ステートメントを個別に呼び出します。 (DbDataAdapter から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | Disposed | コンポーネントの Disposed イベントを待機するイベント ハンドラを追加します。(Component から継承されます。) |
![]() | FillError | 格納操作中にエラーが発生したときに返されます。(DataAdapter から継承されます。) |
![]() | RowUpdated | Update 処理中に、データ ソースに対してコマンドが実行された後に発生します。更新が試行されると、このイベントが発生します。 |
![]() | RowUpdating | Update 処理中に、データ ソースに対してコマンドが実行される前に発生します。更新が試行されると、このイベントが発生します。 |

名前 | 説明 | |
---|---|---|
![]() | System.ICloneable.Clone | このメンバの説明については、Clone のトピックを参照してください。 |
![]() | System.Data.IDbDataAdapter.UpdateCommand | このメンバの説明については、UpdateCommand のトピックを参照してください。 |

Weblioに収録されているすべての辞書からSqlDataAdapterを検索する場合は、下記のリンクをクリックしてください。

- SqlDataAdapterのページへのリンク