Dealing with Data

With ADO.NET, you have new capabilities for both retrieving and using data. Your application can retrieve data directly into a DataReader much like the classic ASP RecordSet, or into a temporary, in-memory database structure called a DataSet. This DataSet can then be used to populate structures such as DataGrids and Repeaters, used to display the information.

Creating a Connection with ADO.NET

The most common source for data is a database, so before you retrieve any data, you will have to create a connection. Three different objects for creating a connection are included in System.Data.SQL: DBConnection, OleDbConnection, and SQLConnection. DBConnection is a general class inherited by all other classes. OleDbConnection is much ...

Get ASP.NET by Example 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.