This is okay because they have a given region or customer base where other people won’t be changing the same records.
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.
At the beginning of the day, they’ll need to sync up with the main database to have the latest information available.
During the day, they’ll make modifications to existing customer data, add new customers, and input new orders.
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.
A couple scenarios illustrate why you would want to work with disconnected data: people working without network connectivity and making Web sites more scalable.
In Lesson 3, we discussed a fully connected mode of operation for interacting with a data source by using the Sql Command object.
In Lesson 4, we learned about how to read data quickly an let go of the connection with the Sql Data Reader.
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.
These are the mechanics of working with disconnected data.Because the applications holds on to connections only when necessary, the application becomes more scalable.