DataAdapter Class represents a set of SQL commands and a database connection that are used to fill the DataSet and update the data source.The DataAdapter serves as a bridge between a DataSet and a data source for retrieving and saving data.
Adapters are used to exchange data between a data source and a dataset. In many applications, this means reading data from a database into a dataset, and then writing changed data from the dataset back to the database. You can use a data adapter to perform the following operations:
Retrieve rows from a data store into corresponding data tables within the dataset.
To retrieve rows into a dataset, use the Fill method on a data adapter object (SqlDataAdapter, OleDbDataAdapter, OdbcDataAdapter, or OracleDataAdapter). When you invoke the Fill method, it transmits an SQL SELECT statement to the data store.
Transmit changes made to a dataset table to the corresponding data store.
To transmit a dataset table of the dataset to the data store, use the adapter's Update method. When you invoke the method, it executes whatever SQL INSERT, UPDATE or DELETE statements are needed, depending on whether the affected record is new, changed, or deleted.