Chapter 9. Querying Databases

After completing this chapter, you will be able to:

  • Issue data-modifying queries on external data sources

  • Retrieve a table of records from a SQL Server database

  • Return the primary key value for a newly inserted database record

Despite its capability to work with data generated completely within an application, ADO.NET’s main purpose is to access and manipulate data in external data stores. To enable this query-and-update functionality on the source data platform, ADO.NET includes a “command” object, a wrapper around a platform-specific query that updates, inserts, or deletes target data; or returns single or multiple values from the data source.

This chapter introduces this command wrapper, and demonstrates how to process ...

Get Microsoft® ADO.NET 4 Step by Step now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.