C H A P T E R  15

Using Data Sets and Data Adapters

In Chapter 14, you saw how to use data readers to access database data in a connected, forward-only, read-only fashion. Often, this is all you want to do, and a data reader suits your purposes perfectly.

In this chapter, you’ll look at a new object for accessing data, the data set. Unlike data readers, which are objects of data provider–specific classes that implement the System.Data.IDataReader interface, data sets are objects of the class System.Data.DataSet, a distinct ADO.NET component used by all data providers. Data sets are completely independent of and can be used either connected to or disconnected from data sources. Their fundamental purpose is to provide a relational view of data ...

Get Beginning C# 5.0 Databases, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.