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 ...
Get ASP.NET Developer's JumpStart 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.