O'Reilly logo

ASP.NET Developer's JumpStart by Ken Getz, Paul D. Sheriff

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

Using ADO.NET Connection Objects

As you work through the steps in this chapter, you will create and open a connection to a SQL Server database using an OleDbConnection object and then retrieve information using an OleDbCommand object. In addition, in the second half of the chapter, you will submit SELECT and UPDATE statements to the same SQL Server database using the OleDbCommand object. These are the steps you'll often use—anytime you want to retrieve information and display it in a control, you'll write code like the code you'll see here.

Adding Code to Retrieve and Display Data

For this example, you'll open a connection to a SQL Server database and return the average price of products within a product category. Figure 13.1 shows what your ...

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