Introducing ADO.NET

.NET programs need a standard way of accessing, processing, and reporting information in databases and this is exactly what ADO.NET provides. Table 11-6 lists the major ADO.NET objects that provide these functions.

Table 11-6. Important ADO.NET Objects and Functions

Operating Mode

Object Name

Function

 

SQL Server

All Other DBMSs

 

All

SqlConnection

OleDbConnection

Opens a connection (that is, a pathway) to a DBMS

Individual commands

SqlCommand

OleDbCommand

Stores and executes a SQL statement

One-time read

SqlDataReader

OleDbDataReader

Runs a query and provides one-time, read-only access to the results

Read into memory

Update in memory

Analyze and incorporate changes

SqlDataAdapter

OleDbDataAdapter ...

Get Faster Smarter Beginning Programming 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.