December 2001
Beginner
976 pages
22h 4m
English
In the previous chapter, we showed how to read data from a database using a DataReader object. Here we show how to read data using a DataSet object. The difference here is that the DataSet object is populated with data from the database and then used for managing the data. The DataSet object keeps track of any changes made to the data in the DataSet. The DataSet modifications can be saved back to the database at any point.
When reading data into a DataSet, the idea is to use a DataAdapter object to fill the DataSet. The DataAdapter uses a Connection object and a query string (SQL statement) for retrieving the desired rows from the database. After the DataSet is populated with data, the database connection ...
Read now
Unlock full access