The Sql Data Adapter opens a connection only when required and closes it as soon as it has performed its task.
For example, the Sql Data Adapter performs the following tasks when filling a Data Set with data: In between the Fill and Update operations, data source connections are closed and you are free to read and write data with the Data Set as you need.
In Lesson 3, we discussed a fully connected mode of operation for interacting with a data source by using the Sql Command object.
This Lesson shows how to accomplish something in-between Sql Connection and Sql Data Reader interaction by using the Data Set and Sql Data Adapter objects.
A Data Set is an in-memory data store that can hold numerous tables.
Data Sets only hold data and do not interact with a data source.
It is the Sql Data Adapter that manages connections with the data source and gives us disconnected behavior.
These are the mechanics of working with disconnected data.Because the applications holds on to connections only when necessary, the application becomes more scalable.