Connected and Disconnected Data
As mentioned earlier, ADO.NET supports two different programming environments: connected and disconnected.
The connected environment provides
forward-only, read-only access to data in the data source and the
ability to execute commands against the data source. The connected
classes provide a common way to work with connected data regardless
of the underlying data source. They include
Connection, Command,
DataReader, Transaction,
ParameterCollection, and
Parameter classes.
The disconnected environment allows data
retrieved from the data source to be manipulated and later reconciled
with the data source. The disconnected classes provide a common way
to work with disconnected data regardless of the underlying data
source. They include the DataSet,
DataTable, DataColumn,
DataRow, Constraint,
DataRelationship, and DataView
classes.
Finally, ADO.NET introduces the connected
DataAdapter class to bridge the data source and
disconnected classes by way of the connected classes. The
DataAdapter is an abstraction of the connected
classes that simplifies filling the disconnected
DataSet or DataTable classes
with data from the data source and updating the data source to
reflect any changes made to the disconnected data. Figure 1-1 shows the relationship between the connected
and disconnected classes in ADO.NET.
![]() |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access
