Javatpoint Logo
Javatpoint Logo

ADO.NET DataAdapter

The DataAdapter works as a bridge between a DataSet and a data source to retrieve data. DataAdapter is a class that represents a set of SQL commands and a database connection. It can be used to fill the DataSet and update the data source.

DataAdapter Class Signature

DataAdapter Constructors

Constructors Description
DataAdapter() It is used to initialize a new instance of a DataAdapter class.
DataAdapter(DataAdapter) It is used to initializes a new instance of a DataAdapter class from an existing object of the same type.

Methods

Method Description
CloneInternals() It is used to create a copy of this instance of DataAdapter.
Dispose(Boolean) It is used to release the unmanaged resources used by the DataAdapter.
Fill(DataSet) It is used to add rows in the DataSet to match those in the data source.
FillSchema(DataSet, SchemaType, String, IDataReader) It is used to add a DataTable to the specified DataSet.
GetFillParameters() It is used to get the parameters set by the user when executing an SQL SELECT statement.
ResetFillLoadOption() It is used to reset FillLoadOption to its default state.
ShouldSerializeAcceptChangesDuringFill() It determines whether the AcceptChangesDuringFill property should be persisted or not.
ShouldSerializeFillLoadOption() It determines whether the FillLoadOption property should be persisted or not.
ShouldSerializeTableMappings() It determines whether one or more DataTableMapping objects exist or not.
Update(DataSet) It is used to call the respective INSERT, UPDATE, or DELETE statements.

Example

// DataSetDemo.aspx

CodeBehind

Output:

ADO Net Dataadapter 1
Next TopicADO.NET DataTables




Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


B.Tech / MCA