January 2003
Beginner
696 pages
16h 38m
English
If you need more flexibility than a DataReader offers, you can use a DataSet object as a container for records from the database. In Figure 10.2, you saw where the DataSet fits in a disconnected data access scenario. The DataSet itself doesn't connect to a database; it simply holds data and table information in its DataTables collection. To get data into a DataSet, you use a DataAdapter. The DataAdapter supplies the methods and properties to connect to a database, retrieve data, and populate the DataSet with that data. There are two key methods of the DataAdapter object: Fill and Update. The Fill method takes a DataSet and DataTable parameter to fill the records from a Command object's SQL statement. You still ...
Read now
Unlock full access