Export (0) Print
Expand All

DbDataAdapter Class

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.

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

'Declaration
Public MustInherit Class DbDataAdapter _
	Inherits DataAdapter _
	Implements IDbDataAdapter, IDataAdapter, ICloneable

The DbDataAdapter type exposes the following members.

  NameDescription
Protected methodSupported by the XNA FrameworkDbDataAdapterInitializes a new instance of a DataAdapter class.
Protected methodSupported by the XNA FrameworkDbDataAdapter(DbDataAdapter)Initializes a new instance of a DataAdapter class from an existing object of the same type.
Top

  NameDescription
Public propertySupported by the XNA FrameworkAcceptChangesDuringFillGets 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.)
Public propertySupported by the XNA FrameworkAcceptChangesDuringUpdateGets or sets whether AcceptChanges is called during a Update. (Inherited from DataAdapter.)
Protected propertyCanRaiseEventsGets a value indicating whether the component can raise an event. (Inherited from Component.)
Public propertyContainerGets the IContainer that contains the Component. (Inherited from Component.)
Public propertySupported by the XNA FrameworkContinueUpdateOnErrorGets or sets a value that specifies whether to generate an exception when an error is encountered during a row update. (Inherited from DataAdapter.)
Public propertySupported by the XNA FrameworkDeleteCommandGets or sets a command for deleting records from the data set.
Protected propertyDesignModeGets a value that indicates whether the Component is currently in design mode. (Inherited from Component.)
Protected propertySupported by the XNA FrameworkEventsGets the list of event handlers that are attached to this Component. (Inherited from Component.)
Protected propertySupported by the XNA FrameworkFillCommandBehaviorGets or sets the behavior of the command used to fill the data adapter.
Public propertySupported by the XNA FrameworkFillLoadOptionGets or sets the LoadOption that determines how the adapter fills the DataTable from the DbDataReader. (Inherited from DataAdapter.)
Public propertySupported by the XNA FrameworkInsertCommandGets or sets a command used to insert new records into the data source.
Public propertySupported by the XNA FrameworkMissingMappingActionDetermines the action to take when incoming data does not have a matching table or column. (Inherited from DataAdapter.)
Public propertySupported by the XNA FrameworkMissingSchemaActionDetermines the action to take when existing DataSet schema does not match incoming data. (Inherited from DataAdapter.)
Public propertySupported by the XNA FrameworkReturnProviderSpecificTypesGets or sets whether the Fill method should return provider-specific values or common CLS-compliant values. (Inherited from DataAdapter.)
Public propertySupported by the XNA FrameworkSelectCommandGets or sets a command used to select records in the data source.
Public propertySupported by the XNA FrameworkSiteGets or sets the ISite of the Component. (Inherited from Component.)
Public propertySupported by the XNA FrameworkTableMappingsGets a collection that provides the master mapping between a source table and a DataTable. (Inherited from DataAdapter.)
Public propertySupported by the XNA FrameworkUpdateBatchSizeGets or sets a value that enables or disables batch processing support, and specifies the number of commands that can be executed in a batch.
Public propertySupported by the XNA FrameworkUpdateCommandGets or sets a command used to update records in the data source.
Top

  NameDescription
Protected methodSupported by the XNA FrameworkAddToBatchAdds a IDbCommand to the current batch.
Protected methodSupported by the XNA FrameworkClearBatchRemoves all IDbCommand objects from the batch.
Protected methodSupported by the XNA FrameworkCloneInternals Obsolete. Creates a copy of this instance of DataAdapter. (Inherited from DataAdapter.)
Public methodCreateObjRefCreates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.)
Protected methodSupported by the XNA FrameworkCreateRowUpdatedEventInitializes a new instance of the RowUpdatedEventArgs class.
Protected methodSupported by the XNA FrameworkCreateRowUpdatingEventInitializes a new instance of the RowUpdatingEventArgs class.
Protected methodSupported by the XNA FrameworkCreateTableMappingsCreates a new DataTableMappingCollection. (Inherited from DataAdapter.)
Public methodSupported by the XNA FrameworkDisposeReleases all resources used by the Component. (Inherited from Component.)
Protected methodSupported by the XNA FrameworkDispose(Boolean)Releases the unmanaged resources used by the DbDataAdapter and optionally releases the managed resources. (Overrides DataAdapter.Dispose(Boolean).)
Public methodSupported by the XNA FrameworkEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodSupported by the XNA FrameworkExecuteBatchExecutes the current batch.
Public methodSupported by the XNA FrameworkFill(DataSet)Adds or refreshes rows in the DataSet. (Overrides DataAdapter.Fill(DataSet).)
Public methodSupported by the XNA FrameworkFill(DataTable)Adds or refreshes rows in a specified range in the DataSet to match those in the data source using the DataTable name.
Public methodSupported by the XNA FrameworkFill(DataSet, String)Adds or refreshes rows in the DataSet to match those in the data source using the DataSet and DataTable names.
Protected methodSupported by the XNA FrameworkFill(DataTable, IDataReader)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.)
Protected methodSupported by the XNA FrameworkFill(DataTable, IDbCommand, CommandBehavior)Adds or refreshes rows in a DataTable to match those in the data source using the specified DataTable, IDbCommand and CommandBehavior.
Public methodSupported by the XNA FrameworkFill(Int32, Int32, DataTable())Adds or refreshes rows in a DataTable to match those in the data source starting at the specified record and retrieving up to the specified maximum number of records.
Public methodSupported by the XNA FrameworkFill(DataSet, Int32, Int32, String)Adds or refreshes rows in a specified range in the DataSet to match those in the data source using the DataSet and DataTable names.
Protected methodSupported by the XNA FrameworkFill(DataTable(), IDataReader, Int32, Int32)Adds or refreshes rows in a specified range in the collection of DataTable objects to match those in the data source. (Inherited from DataAdapter.)
Protected methodSupported by the XNA FrameworkFill(DataSet, String, IDataReader, Int32, Int32)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.)
Protected methodSupported by the XNA FrameworkFill(DataTable(), Int32, Int32, IDbCommand, CommandBehavior)Adds or refreshes rows in a specified range in the DataSet to match those in the data source using the DataSet and DataTable names.
Protected methodSupported by the XNA FrameworkFill(DataSet, Int32, Int32, String, IDbCommand, CommandBehavior)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.
Public methodSupported by the XNA FrameworkFillSchema(DataSet, SchemaType)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. (Overrides DataAdapter.FillSchema(DataSet, SchemaType).)
Public methodSupported by the XNA FrameworkFillSchema(DataTable, SchemaType)Configures the schema of the specified DataTable based on the specified SchemaType.
Public methodSupported by the XNA FrameworkFillSchema(DataSet, SchemaType, String)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.
Protected methodSupported by the XNA FrameworkFillSchema(DataTable, SchemaType, IDataReader)Adds a DataTable to the specified DataSet. (Inherited from DataAdapter.)
Protected methodSupported by the XNA FrameworkFillSchema(DataSet, SchemaType, String, IDataReader)Adds a DataTable to the specified DataSet. (Inherited from DataAdapter.)
Protected methodSupported by the XNA FrameworkFillSchema(DataTable, SchemaType, IDbCommand, CommandBehavior)Configures the schema of the specified DataTable based on the specified SchemaType, command string, and CommandBehavior values.
Protected methodSupported by the XNA FrameworkFillSchema(DataSet, SchemaType, IDbCommand, String, CommandBehavior)Adds a DataTable to the specified DataSet and configures the schema to match that in the data source based on the specified SchemaType.
Protected methodSupported by the XNA FrameworkFinalizeReleases unmanaged resources and performs other cleanup operations before the Component is reclaimed by garbage collection. (Inherited from Component.)
Protected methodSupported by the XNA FrameworkGetBatchedParameterReturns a IDataParameter from one of the commands in the current batch.
Protected methodSupported by the XNA FrameworkGetBatchedRecordsAffectedReturns information about an individual update attempt within a larger batched update.
Public methodSupported by the XNA FrameworkGetFillParametersGets the parameters set by the user when executing an SQL SELECT statement. (Overrides DataAdapter.GetFillParameters.)
Public methodSupported by the XNA FrameworkGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetLifetimeServiceRetrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
Protected methodGetServiceReturns an object that represents a service provided by the Component or by its Container. (Inherited from Component.)
Public methodSupported by the XNA FrameworkGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodSupported by the XNA FrameworkHasTableMappingsIndicates whether a DataTableMappingCollection has been created. (Inherited from DataAdapter.)
Protected methodSupported by the XNA FrameworkInitializeBatchingInitializes batching for the DbDataAdapter.
Public methodInitializeLifetimeServiceObtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
Protected methodSupported by the XNA FrameworkMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Protected methodMemberwiseClone(Boolean)Creates a shallow copy of the current MarshalByRefObject object. (Inherited from MarshalByRefObject.)
Protected methodSupported by the XNA FrameworkOnFillErrorInvoked when an error occurs during a Fill. (Inherited from DataAdapter.)
Protected methodSupported by the XNA FrameworkOnRowUpdatedRaises the RowUpdated event of a .NET Framework data provider.
Protected methodSupported by the XNA FrameworkOnRowUpdatingRaises the RowUpdating event of a .NET Framework data provider.
Public methodSupported by the XNA FrameworkResetFillLoadOptionResets FillLoadOption to its default state and causes DataAdapter.Fill to honor AcceptChangesDuringFill. (Inherited from DataAdapter.)
Public methodSupported by the XNA FrameworkShouldSerializeAcceptChangesDuringFillDetermines whether the AcceptChangesDuringFill property should be persisted. (Inherited from DataAdapter.)
Public methodSupported by the XNA FrameworkShouldSerializeFillLoadOptionDetermines whether the FillLoadOption property should be persisted. (Inherited from DataAdapter.)
Protected methodSupported by the XNA FrameworkShouldSerializeTableMappingsDetermines whether one or more DataTableMapping objects exist and they should be persisted. (Inherited from DataAdapter.)
Protected methodSupported by the XNA FrameworkTerminateBatchingEnds batching for the DbDataAdapter.
Public methodSupported by the XNA FrameworkToStringReturns a String containing the name of the Component, if any. This method should not be overridden. (Inherited from Component.)

In XNA Framework 3.0, this member is inherited from Object.ToString.
Public methodSupported by the XNA FrameworkUpdate(DataRow())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.
Public methodSupported by the XNA FrameworkUpdate(DataSet)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. (Overrides DataAdapter.Update(DataSet).)
Public methodSupported by the XNA FrameworkUpdate(DataTable)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.
Protected methodSupported by the XNA FrameworkUpdate(DataRow(), DataTableMapping)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 DataSet objects.
Public methodSupported by the XNA FrameworkUpdate(DataSet, String)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.
Top

  NameDescription
Public eventSupported by the XNA FrameworkDisposedOccurs when the component is disposed by a call to the Dispose method. (Inherited from Component.)
Public eventSupported by the XNA FrameworkFillErrorReturned when an error occurs during a fill operation. (Inherited from DataAdapter.)
Top

  NameDescription
Public fieldStatic memberSupported by the XNA FrameworkDefaultSourceTableNameThe default name used by the DataAdapter object for table mappings.
Top

  NameDescription
Explicit interface implemetationPrivate methodSupported by the XNA FrameworkICloneable.CloneCreates a new object that is a copy of the current instance.
Explicit interface implemetationPrivate propertySupported by the XNA FrameworkIDataAdapter.TableMappingsIndicates how a source table is mapped to a dataset table. (Inherited from DataAdapter.)
Explicit interface implemetationPrivate propertySupported by the XNA FrameworkIDbDataAdapter.DeleteCommandGets or sets an SQL statement for deleting records from the data set.
Explicit interface implemetationPrivate propertySupported by the XNA FrameworkIDbDataAdapter.InsertCommandGets or sets an SQL statement used to insert new records into the data source.
Explicit interface implemetationPrivate propertySupported by the XNA FrameworkIDbDataAdapter.SelectCommandGets or sets an SQL statement used to select records in the data source.
Explicit interface implemetationPrivate propertySupported by the XNA FrameworkIDbDataAdapter.UpdateCommandGets or sets an SQL statement used to update records in the data source.
Top

The DbDataAdapter class inherits from the DataAdapter class and helps a class implement a DataAdapter designed for use with a relational database.

An application does not create an instance of the DbDataAdapter interface directly, but creates an instance of a class that inherits IDbDataAdapter and DbDataAdapter.

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 interface 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

PrvDataAdapter()

Initializes a new instance of the PrvDataAdapter class.

PrvDataAdapter(PrvCommand selectCommand)

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.

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.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

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.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2014 Microsoft