System.Data.Common.DataAdapter Class

Represents a set of SQL commands and a database connection that are used to fill the System.Data.DataSet and update the data source.

See Also: DataAdapter Members

Syntax

public class DataAdapter : System.ComponentModel.Component, System.Data.IDataAdapter

Remarks

The System.Data.Common.DataAdapter serves as a bridge between a System.Data.DataSet and a data source for retrieving and saving data. The System.Data.Common.DataAdapter provides this bridge by mapping DataAdapter.Fill(System.Data.DataSet), which changes the data in the System.Data.DataSet to match the data in the data source, and System.Data.IDataAdapter.Update(System.Data.DataSet), which changes the data in the data source to match the data in the System.Data.DataSet.

If you are connecting to a SQL Server database, you can increase overall performance by using the System.Data.SqlClient.SqlDataAdapter along with its associated System.Data.SqlClient.SqlCommand and System.Data.SqlClient.SqlConnection objects. For OLE DB-supported data sources, use the System.Data.Common.DataAdapter with its associated System.Data.OleDb.OleDbCommand and System.Data.OleDb.OleDbConnection objects. For ODBC-supported data sources, use the System.Data.Common.DataAdapter with its associated System.Data.Odbc.OdbcCommand and System.Data.Odbc.OdbcConnection objects. For Oracle databases, use the System.Data.Common.DataAdapter with its associated System.Data.OracleClient.OracleCommand and System.Data.OracleClient.OracleConnection objects.

When an instance of System.Data.Common.DataAdapter is created, the read/write properties are set to initial values. For a list of these values, see the System.Data.Common.DataAdapter constructor.

Requirements

Namespace: System.Data.Common
Assembly: System.Data (in System.Data.dll)
Assembly Versions: 1.0.3300.0, 1.0.5000.0, 2.0.0.0