DbDataAdapter
DbDataAdapter
DbDataAdapter
DbDataAdapter
Class
Definition
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 abstract class DbDataAdapter : System.Data.Common.DataAdapter, ICloneable, System.Data.IDbDataAdapter
type DbDataAdapter = class
inherit DataAdapter
interface IDbDataAdapter
interface ICloneable
interface IDataAdapter
Public MustInherit Class DbDataAdapter
Inherits DataAdapter
Implements ICloneable, IDbDataAdapter
- Inheritance
-
DbDataAdapterDbDataAdapterDbDataAdapterDbDataAdapter
- Derived
-
System.Data.Odbc.OdbcDataAdapterSystem.Data.Odbc.OdbcDataAdapterSystem.Data.Odbc.OdbcDataAdapterSystem.Data.Odbc.OdbcDataAdapterSystem.Data.OleDb.OleDbDataAdapterSystem.Data.OleDb.OleDbDataAdapterSystem.Data.OleDb.OleDbDataAdapterSystem.Data.OleDb.OleDbDataAdapter
- Implements
Remarks
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.
Notes to Inheritors
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.
Constructors
DbDataAdapter() DbDataAdapter() DbDataAdapter() DbDataAdapter() |
Initializes a new instance of a DataAdapter class. |
DbDataAdapter(DbDataAdapter) DbDataAdapter(DbDataAdapter) DbDataAdapter(DbDataAdapter) DbDataAdapter(DbDataAdapter) |
Initializes a new instance of a |
Fields
DefaultSourceTableName DefaultSourceTableName DefaultSourceTableName DefaultSourceTableName |
The default name used by the DataAdapter object for table mappings. |
Properties
AcceptChangesDuringFill AcceptChangesDuringFill AcceptChangesDuringFill AcceptChangesDuringFill |
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) |
AcceptChangesDuringUpdate AcceptChangesDuringUpdate AcceptChangesDuringUpdate AcceptChangesDuringUpdate |
Gets or sets whether AcceptChanges() is called during a Update(DataSet). (Inherited from DataAdapter) |
CanRaiseEvents CanRaiseEvents CanRaiseEvents CanRaiseEvents |
Gets a value indicating whether the component can raise an event. (Inherited from Component) |
Container Container Container Container |
Gets the IContainer that contains the Component. (Inherited from Component) |
ContinueUpdateOnError ContinueUpdateOnError ContinueUpdateOnError ContinueUpdateOnError |
Gets or sets a value that specifies whether to generate an exception when an error is encountered during a row update. (Inherited from DataAdapter) |
DeleteCommand DeleteCommand DeleteCommand DeleteCommand |
Gets or sets a command for deleting records from the data set. |
DesignMode DesignMode DesignMode DesignMode |
Gets a value that indicates whether the Component is currently in design mode. (Inherited from Component) |
Events Events Events Events |
Gets the list of event handlers that are attached to this Component. (Inherited from Component) |
FillCommandBehavior FillCommandBehavior FillCommandBehavior FillCommandBehavior |
Gets or sets the behavior of the command used to fill the data adapter. |
FillLoadOption FillLoadOption FillLoadOption FillLoadOption |
Gets or sets the LoadOption that determines how the adapter fills the DataTable from the DbDataReader. (Inherited from DataAdapter) |
IDataAdapter.TableMappings IDataAdapter.TableMappings IDataAdapter.TableMappings IDataAdapter.TableMappings |
Indicates how a source table is mapped to a dataset table. (Inherited from DataAdapter) |
InsertCommand InsertCommand InsertCommand InsertCommand |
Gets or sets a command used to insert new records into the data source. |
MissingMappingAction MissingMappingAction MissingMappingAction MissingMappingAction |
Determines the action to take when incoming data does not have a matching table or column. (Inherited from DataAdapter) |
MissingSchemaAction MissingSchemaAction MissingSchemaAction MissingSchemaAction |
Determines the action to take when existing DataSet schema does not match incoming data. (Inherited from DataAdapter) |
ReturnProviderSpecificTypes ReturnProviderSpecificTypes ReturnProviderSpecificTypes ReturnProviderSpecificTypes |
Gets or sets whether the |
SelectCommand SelectCommand SelectCommand SelectCommand |
Gets or sets a command used to select records in the data source. |
Site Site Site Site |
Gets or sets the ISite of the Component. (Inherited from Component) |
TableMappings TableMappings TableMappings TableMappings |
Gets a collection that provides the master mapping between a source table and a DataTable. (Inherited from DataAdapter) |
UpdateBatchSize UpdateBatchSize UpdateBatchSize UpdateBatchSize |
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. |
UpdateCommand UpdateCommand UpdateCommand UpdateCommand |
Gets or sets a command used to update records in the data source. |
Methods
Explicit Interface Implementations
ICloneable.Clone() ICloneable.Clone() ICloneable.Clone() ICloneable.Clone() |
Creates a new object that is a copy of the current instance. |
IDbDataAdapter.DeleteCommand IDbDataAdapter.DeleteCommand IDbDataAdapter.DeleteCommand IDbDataAdapter.DeleteCommand |
Gets or sets an SQL statement for deleting records from the data set. |
IDbDataAdapter.InsertCommand IDbDataAdapter.InsertCommand IDbDataAdapter.InsertCommand IDbDataAdapter.InsertCommand |
Gets or sets an SQL statement used to insert new records into the data source. |
IDbDataAdapter.SelectCommand IDbDataAdapter.SelectCommand IDbDataAdapter.SelectCommand IDbDataAdapter.SelectCommand |
Gets or sets an SQL statement used to select records in the data source. |
IDbDataAdapter.UpdateCommand IDbDataAdapter.UpdateCommand IDbDataAdapter.UpdateCommand IDbDataAdapter.UpdateCommand |
Gets or sets an SQL statement used to update records in the data source. |
Events
Disposed Disposed Disposed Disposed |
Occurs when the component is disposed by a call to the Dispose() method. (Inherited from Component) |
FillError FillError FillError FillError |
Returned when an error occurs during a fill operation. (Inherited from DataAdapter) |