O'Reilly logo

Sams Teach Yourself ADO.NET in 24 Hours by Paul Bertucci, Jason Lefebvre

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

Optimizing ADO.NET Code

Several ways exist to increase the performance of ADO.NET code in your Web or Windows forms applications. In this section, you'll see some direct improvements you can make to your ADO.NET code to improve the speed of your data access.

DataReader Versus DataSet

As you know, you have two different ways of retrieving data from your data source using ADO.NET. You can use a DataAdapter object to fill a DataSet with data, and then work with the data in the DataSet or display it on a form using a DataGrid or other mechanism for display. In a number of cases, you need a DataSet: You might need to perform calculations or otherwise work on several items within the DataSet at once. However, if you're just displaying data, the DataReader ...

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