Chapter 12. Data Management with ADO.NET

This chapter provides information on programming with the data management features that are part of ADO.NET. The discussion begins with the basics of ADO.NET and later dives into the ways you can use the newly added ADO.NET 2.0 features to manage data contained in a relational database.

ADO.NET, first introduced in version 1.0 of the .NET Framework, provided an extensive array of features to handle live data in a connected mode or data that is disconnected from its underlying data store. ADO.NET 1.0 was primarily developed to address two specific problems in getting at data. The first had to do with the user's need to access data once and to iterate through a collection of data in a single instance. This need often arose in Web application development.

In Web application development, many of the developer's data situations involve opening a data store of some kind, making a request for specific data, and then populating a table in the browser with the data. As a developer, you need to access this data only once to generate a page for the end user.

ADO.NET addresses this situation quite well with the DataReader. The DataReader was developed to get at data and in a read-only, forward-only fashion, and to provide this data as fast as possible to enable the developer to populate tables or controls.

The other situation that ADO.NET addressed involved taking a snapshot of data from the database and storing this data offline for as long as necessary. ...

Get Professional ASP.NET 2.0 Special Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.