• DataAdapter :-
• Data Adapter has select command property which is used to retrieve data from database.
• DataAdapter places results of query into DataSet/ DataTable.
• It also has delete update and insert command.
• Data Adaper has fill() method to populate DataSet object with data that SQLDataAdaper object
retrieves from database.
• • Syntax of fill.
• • da.Fill(ds,”emp”);
• We have disconnected data access using dataset and sqldataadapter objects.
• A dataset is considered as in memory data store which can store numerous tables.
• Datasets are used to hold the data. They do not interact with database / data source.
• The SQL data adapter is used handle connection with data source and manages disconnected
behaviour.
• The most important is that connection is open by SQL data adapter when needed and closed as
soon as operation is accomplished.
• eg. To fill dataset following steps are performed by SQL DataAdapter.
• • Step1) Open connection
• • 2) Retrieve data into dataset.
• • 3) Close connection.
• To Update dataset with data source changes following steps are performed.
• • 1) open connection