DbDataAdapter Class
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Aids implementation of the IDbDataAdapter interface. Inheritors of DbDataAdapter implement a set of functions to provide strong typing, but inherit most of the functionality needed to fully implement a DataAdapter.
public ref class DbDataAdapter abstract : System::Data::Common::DataAdapter, ICloneable, System::Data::IDbDataAdapter
public ref class DbDataAdapter abstract : System::Data::Common::DataAdapter, ICloneable
public abstract class DbDataAdapter : System.Data.Common.DataAdapter, ICloneable, System.Data.IDbDataAdapter
public abstract class DbDataAdapter : System.Data.Common.DataAdapter, ICloneable
type DbDataAdapter = class
inherit DataAdapter
interface IDataAdapter
interface IDbDataAdapter
interface ICloneable
type DbDataAdapter = class
inherit DataAdapter
interface ICloneable
type DbDataAdapter = class
inherit DataAdapter
interface IDbDataAdapter
interface IDataAdapter
interface ICloneable
Public MustInherit Class DbDataAdapter
Inherits DataAdapter
Implements ICloneable, IDbDataAdapter
Public MustInherit Class DbDataAdapter
Inherits DataAdapter
Implements ICloneable
- Inheritance
- Derived
- Implements
The DbDataAdapter class inherits from the DataAdapter class and implements the IDbDataAdapter interface. It helps a class implement a DataAdapter designed for use with a relational database.
An application does not create an instance of the DbDataAdapter class directly, but creates an instance of a class that inherits from it.
Classes that inherit DbDataAdapter must implement the inherited members, and typically define additional members to add provider-specific functionality. For example, the DbDataAdapter class defines the SelectCommand property, and the DbDataAdapter class defines eight overloads of the Fill method. In turn, the OleDbDataAdapter class inherits the Fill method, and also defines two additional overloads of Fill that take an ADO Recordset object as a parameter.
When you inherit from the DbDataAdapter class, we recommend that you implement the following constructors:
Item | Description |
---|---|
*Prv*DataAdapter() | Initializes a new instance of the *Prv*DataAdapter class. |
*Prv*DataAdapter(*Prv*Command *selectCommand*) | Initializes a new instance of the *Prv*DataAdapter class with the specified SQL SELECT statement. |
*Prv*DataAdapter(string *selectCommandText*, string *selectConnectionString*) | Initializes a new instance of the *Prv*DataAdapter class with an SQL SELECT statement and a connection string. |
*Prv*DataAdapter(string *selectCommandText*, *Prv*Connection *selectConnection*) | Initializes a new instance of the *Prv*DataAdapter class with an SQL SELECT statement and a *Prv*Connection object. |
To promote consistency among .NET Framework data providers, you should name the inheriting class in the form PrvDataAdapter, 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.
Db |
Initializes a new instance of a DataAdapter class. |
Db |
Initializes a new instance of the |
Default |
The default name used by the DataAdapter object for table mappings. |
Accept |
Gets or sets a value indicating whether AcceptChanges() is called on a DataRow after it is added to the DataTable during any of the Fill operations. (Inherited from DataAdapter) |
Accept |
Gets or sets whether AcceptChanges() is called during a Update(DataSet). (Inherited from DataAdapter) |
Can |
Gets a value indicating whether the component can raise an event. (Inherited from Component) |
Container |
Gets the IContainer that contains the Component. (Inherited from Component) |
Continue |
Gets or sets a value that specifies whether to generate an exception when an error is encountered during a row update. (Inherited from DataAdapter) |
Delete |
Gets or sets a command for deleting records from the data set. |
Design |
Gets a value that indicates whether the Component is currently in design mode. (Inherited from Component) |
Events |
Gets the list of event handlers that are attached to this Component. (Inherited from Component) |
Fill |
Gets or sets the behavior of the command used to fill the data adapter. |
Fill |
Gets or sets the LoadOption that determines how the adapter fills the DataTable from the DbDataReader. (Inherited from DataAdapter) |
Insert |
Gets or sets a command used to insert new records into the data source. |
Missing |
Determines the action to take when incoming data does not have a matching table or column. (Inherited from DataAdapter) |
Missing |
Determines the action to take when existing DataSet schema does not match incoming data. (Inherited from DataAdapter) |
Return |
Gets or sets whether the |
Select |
Gets or sets a command used to select records in the data source. |
Site |
Gets or sets the ISite of the Component. (Inherited from Component) |
Table |
Gets a collection that provides the primary mapping between a source table and a DataTable. (Inherited from DataAdapter) |
Update |
Gets or sets a value that enables or disables batch processing support, and specifies the number of commands that can be executed in a batch. |
Update |
Gets or sets a command used to update records in the data source. |
Add |
Adds a IDbCommand to the current batch. |
Clear |
Removes all IDbCommand objects from the batch. |
Clone |
Obsolete.
Obsolete.
Obsolete.
Obsolete.
Creates a copy of this instance of DataAdapter. (Inherited from DataAdapter) |
Create |
Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject) |
Create |
Initializes a new instance of the RowUpdatedEventArgs class. |
Create |
Initializes a new instance of the RowUpdatingEventArgs class. |
Create |
Creates a new DataTableMappingCollection. (Inherited from DataAdapter) |
Dispose() |
Releases all resources used by the Component. (Inherited from Component) |
Dispose(Boolean) |
Releases the unmanaged resources used by the DbDataAdapter and optionally releases the managed resources. |
Equals(Object) |
Determines whether the specified object is equal to the current object. (Inherited from Object) |
Execute |
Executes the current batch. |
Fill(Data |
Adds or refreshes rows in a specified range in the DataSet to match those in the data source using the DataSet and source table names, command string, and command behavior. |
Fill(Data |
Adds or refreshes rows in a specified range in the DataSet to match those in the data source using the DataSet and DataTable names. |
Fill(Data |
Adds or refreshes rows in a specified range in the DataSet to match those in the data source using the DataSet, DataTable, and IDataReader names. |
Fill(Data |
Adds or refreshes rows in a specified range in the DataSet to match those in the data source using the DataSet and DataTable names. (Inherited from DataAdapter) |
Fill(Data |
Adds or refreshes rows in the DataSet to match those in the data source using the DataSet and DataTable names. |
Fill(Data |
Adds or refreshes rows in the DataSet. |
Fill(Data |
Adds or refreshes rows in a DataTable to match those in the data source using the specified DataTable and IDataReader names. |
Fill(Data |
Adds or refreshes rows in the DataTable to match those in the data source using the DataTable name and the specified IDataReader. (Inherited from DataAdapter) |
Fill(Data |
Adds or refreshes rows in a DataTable to match those in the data source using the specified DataTable, IDbCommand and CommandBehavior. |
Fill(Data |
Adds or refreshes rows in a specified range in the DataSet to match those in the data source using the DataTable name. |
Fill(Data |
Adds or refreshes rows in a specified range in the collection of DataTable objects to match those in the data source. (Inherited from DataAdapter) |
Fill(Data |
Adds or refreshes rows in a specified range in the DataSet to match those in the data source using the DataSet and DataTable names. |
Fill(Int32, Int32, Data |
Adds or refreshes rows in one or more DataTable objects to match those in the data source starting at the specified record and retrieving up to the specified maximum number of records. |
Fill |
Adds a DataTable to the specified DataSet and configures the schema to match that in the data source based on the specified SchemaType. |
Fill |
Adds a DataTable to the specified DataSet. (Inherited from DataAdapter) |
Fill |
Adds a DataTable to the specified DataSet and configures the schema to match that in the data source based upon the specified SchemaType and DataTable. |
Fill |
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. |
Fill |
Adds a DataTable to the specified DataSet. (Inherited from DataAdapter) |
Fill |
Configures the schema of the specified DataTable based on the specified SchemaType, command string, and CommandBehavior values. |
Fill |
Configures the schema of the specified DataTable based on the specified SchemaType. |
Get |
Returns a IDataParameter from one of the commands in the current batch. |
Get |
Returns information about an individual update attempt within a larger batched update. |
Get |
Gets the parameters set by the user when executing an SQL SELECT statement. |
Get |
Serves as the default hash function. (Inherited from Object) |
Get |
Obsolete.
Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject) |
Get |
Returns an object that represents a service provided by the Component or by its Container. (Inherited from Component) |
Get |
Gets the Type of the current instance. (Inherited from Object) |
Has |
Indicates whether a DataTableMappingCollection has been created. (Inherited from DataAdapter) |
Initialize |
Initializes batching for the DbDataAdapter. |
Initialize |
Obsolete.
Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject) |
Memberwise |
Creates a shallow copy of the current Object. (Inherited from Object) |
Memberwise |
Creates a shallow copy of the current MarshalByRefObject object. (Inherited from MarshalByRefObject) |
On |
Raises the FillError event. |
On |
Invoked when an error occurs during a |
On |
Raises the |
On |
Raises the |
Reset |
Resets FillLoadOption to its default state and causes Fill(DataSet) to honor AcceptChangesDuringFill. (Inherited from DataAdapter) |
Should |
Determines whether the AcceptChangesDuringFill property should be persisted. (Inherited from DataAdapter) |
Should |
Determines whether the FillLoadOption property should be persisted. (Inherited from DataAdapter) |
Should |
Determines whether one or more DataTableMapping objects exist and they should be persisted. (Inherited from DataAdapter) |
Terminate |
Ends batching for the DbDataAdapter. |
To |
Returns a String containing the name of the Component, if any. This method should not be overridden. (Inherited from Component) |
Update(Data |
Updates the values in the database by executing the respective INSERT, UPDATE, or DELETE statements for each inserted, updated, or deleted row in the specified array of DataRow objects. |
Update(Data |
Updates the values in the database by executing the respective INSERT, UPDATE, or DELETE statements for each inserted, updated, or deleted row in the specified array in the DataSet. |
Update(Data |
Updates the values in the database by executing the respective INSERT, UPDATE, or DELETE statements for each inserted, updated, or deleted row in the DataSet with the specified DataTable name. |
Update(Data |
Updates the values in the database by executing the respective INSERT, UPDATE, or DELETE statements for each inserted, updated, or deleted row in the specified DataSet. |
Update(Data |
Updates the values in the database by executing the respective INSERT, UPDATE, or DELETE statements for each inserted, updated, or deleted row in the specified DataTable. |
Disposed |
Occurs when the component is disposed by a call to the Dispose() method. (Inherited from Component) |
Fill |
Returned when an error occurs during a fill operation. |
Fill |
Returned when an error occurs during a fill operation. (Inherited from DataAdapter) |
ICloneable. |
Obsolete.
Creates a new object that is a copy of the current instance. |
IData |
Gets a collection that indicates how a source table is mapped to a dataset table. (Inherited from DataAdapter) |
IDb |
Gets or sets an SQL statement for deleting records from the data set. |
IDb |
Gets or sets an SQL statement used to insert new records into the data source. |
IDb |
Gets or sets an SQL statement used to select records in the data source. |
IDb |
Gets or sets an SQL statement used to update records in the data source. |
Product | Versions |
---|---|
.NET | Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0, 2.1 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: