O'Reilly logo

ASP.NET by Example by Steven A. Smith

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required