Represents a set of command-related properties that are used to fill the DataSet and update a data source, and is implemented by .NET Framework data providers that access relational databases.
Assembly: System.Data (in System.Data.dll)
Thetype exposes the following members.
|DeleteCommand||Gets or sets an SQL statement for deleting records from the data set.|
|InsertCommand||Gets or sets an SQL statement used to insert new records into the data source.|
|MissingMappingAction||Indicates or specifies whether unmapped source tables or columns are passed with their source names in order to be filtered or to raise an error. (Inherited from IDataAdapter.)|
|MissingSchemaAction||Indicates or specifies whether missing source tables, columns, and their relationships are added to the dataset schema, ignored, or cause an error to be raised. (Inherited from IDataAdapter.)|
|SelectCommand||Gets or sets an SQL statement used to select records in the data source.|
|TableMappings||Indicates how a source table is mapped to a dataset table. (Inherited from IDataAdapter.)|
|UpdateCommand||Gets or sets an SQL statement used to update records in the data source.|
|Fill||Adds or updates rows in the DataSet to match those in the data source using the DataSet name, and creates a DataTable named "Table". (Inherited from IDataAdapter.)|
|FillSchema||Adds a DataTable named "Table" to the specified DataSet and configures the schema to match that in the data source based on the specified SchemaType. (Inherited from IDataAdapter.)|
|GetFillParameters||Gets the parameters set by the user when executing an SQL SELECT statement. (Inherited from IDataAdapter.)|
|Update||Calls the respective INSERT, UPDATE, or DELETE statements for each inserted, updated, or deleted row in the specified DataSet from a DataTable named "Table". (Inherited from IDataAdapter.)|
The interface inherits from the IDataAdapter interface and allows an object to create a DataAdapter designed for use with a relational database. The interface and, optionally, the utility class, DbDataAdapter, allow an inheriting class to implement a DataAdapter class, which represents the bridge between a data source and a DataSet. For more information about DataAdapter classes, see Populating a DataSet from a DataAdapter. For more information about implementing .NET Framework data providers, see [<topic://cpconimplementingnetdataprovider>].
An application does not create an instance of the interface directly, but creates an instance of a class that inherits and DbDataAdapter.
Classes that inherit must implement the inherited members, and typically define additional members to add provider-specific functionality. For example, the interface defines the SelectCommand property, and the DbDataAdapter interface defines a Fill method that takes a DataTable as a parameter. In turn, the OleDbDataAdapter class inherits the SelectCommand property and the Fill method, and also defines two additional overloads of the Fill method that take an ADO Recordset object as a parameter.Notes to Implementers
To promote consistency among .NET Framework data providers, name the inheriting class in the form Prv DataAdapter where Prv is the uniform prefix given to all classes in a specific .NET Framework data provider namespace. For example, Sql is the prefix of the SqlDataAdapter class in the System.Data.SqlClient namespace.
When you inherit from the interface, you should implement the following constructors:
Initializes a new instance of the PrvDataAdapter class.
Initializes a new instance of the PrvDataAdapter class with the specified SQL SELECT statement.
PrvDataAdapter(string selectCommandText, string selectConnectionString)
Initializes a new instance of the PrvDataAdapter class with an SQL SELECT statement and a connection string.
PrvDataAdapter(string selectCommandText, PrvConnection selectConnection)
Initializes a new instance of the PrvDataAdapter class with an SQL SELECT statement and a PrvConnection object.
The following example uses the derived classes, SqlCommand, SqlDataAdapter and SqlConnection, to select records from a data source. The filled DataSet is then returned. To accomplish this, the method is passed an initialized DataSet, a connection string, and a query string that is a Transact-SQL SELECT statement.
Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.