
Reading Data | 157
Data Access
and Binding
This is the Title of the Book, eMatter Edition
Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved.
ADO.NET: An Overview
The combination of ASP.NET and ADO.NET provides great flexibility in terms of
data sources. Unlike classic ADO, in which support for XML was bolted on after
the basic interfaces were written, ADO.NET was written from the ground up to
deal with XML and does so quite handily. For example, the
DataSet class provides
built-in support for reading from and writing to XML files and streams, and also
provides support for reading, writing, and inferring (from the structure of a table
retrieved from a DBMS) XSD schemas. This makes working with XML data quite
easy, as demonstrated in the custom control examples in Chapter 6.
ADO.NET also provides excellent support for reading data from a DBMS,
including a set of classes for fast, efficient access to data in SQL Server databases
and another set of classes to support OLE DB data sources. Most importantly, in
the
DataSet class, ADO.NET provides an abstract, in-memory representation of
data. By design, once the
DataSet class is populated, it knows nothing about the
backend source from which its data was retrieved; it only knows about the struc-
ture of the tables and data it contains and the relationships between them. This
allows a great deal of flexibility when manipulating data, passing