.NET Framework Class Library
DataAdapter Class

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

Namespace: System.Data.Common
Assembly: System.Data (in system.data.dll)

Syntax

Visual Basic (Declaration)
Public Class DataAdapter
    Inherits Component
    Implements IDataAdapter
Visual Basic (Usage)
Dim instance As DataAdapter
C#
public class DataAdapter : Component, IDataAdapter
C++
public ref class DataAdapter : public Component, IDataAdapter
J#
public class DataAdapter extends Component implements IDataAdapter
JScript
public class DataAdapter extends Component implements IDataAdapter
Remarks

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

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

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

Inheritance Hierarchy

System.Object
   System.MarshalByRefObject
     System.ComponentModel.Component
      System.Data.Common.DataAdapter
         System.Data.Common.DbDataAdapter
Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Platforms

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

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

Version Information

.NET Framework

Supported in: 2.0, 1.1, 1.0

.NET Compact Framework

Supported in: 2.0, 1.0
See Also

Tags :


Page view tracker