What are basic methods of Dataadapter?

What are basic methods of Dataadapter?

The most commonly used methods of the DataAdapter are:

Fill :

This method executes the SelectCommand to fill the DataSet object with data from the data source.
Depending on whether there is a primary key in the DataSet, the ‘fill’ can also be used to update an existing table in a DataSet with changes made to the data in the original datasource.

FillSchema :

This method executes the SelectCommand to extract the schema of a table from the data source.
It creates an empty table in the DataSet object with all the corresponding constraints.

Update :

This method executes the InsertCommand, UpdateCommand, or DeleteCommand to update the original data source with the changes made to the content of the DataSet.

Explain the basic methods of Dataadapter.

Some basic methods of dataadpater are:

Fill : adds or updates the rows to dataset from the datasource.

FillSchema : adds a datatable with the same schema as in the datasource.

Update : it calls insert, update, delete sql commands for transferring all the changes from the dataset to the datasource.

Dispose : releases all the resources.
What is Dataset object? Explain the various objects in Dataset
The DataSet object is a disconnected storage, it is used for manipulation of relational data....
What are the steps involved to fill a dataset?
We fill it with data fetched from the data store. Once the work is done with the dataset, connection is reestablished....
How can we check that some changes have been made to dataset since it was loaded?
The changes made to the dataset can be tracked using the GetChanges and HasChanges methods.....
Post your comment