O'Reilly logo

Special Edition Using C# by NIIT

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

Accessing Databases

In most cases, you will use ADO.NET to access information from databases. The Data Provider and DataSet together provide functionality that makes data access a simple task.

The Basic Operations

The basic operations you can perform with ADO.NET are to retrieve information from tables, display that information, and sort the rows.

Windows Forms generate the output for all of the code examples in this section. Listing 19.4 shows the use of ADO.NET to populate the list in a combo box. To add a list to the combo or list box, you can use either a DataSet or a DataReader. Because the task involves only the reading of records, a DataReader object implements the task.

To execute Listing 19.4, you need to create a form with a combo ...

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