5.2. DataAdapter Classes

The DataAdapter class contains four Command instances as member variables. It uses SelectCommand to move data from the database to DataSet and uses InsertCommand, UpdateCommand, and DeleteCommand to flush updates made to the DataSet back to the database. Figure 5-1 shows the classes that participate in DataSet interactions when you use the SqlClient data provider.

Figure 5-1. DataAdapter Model for SqlClient

Both the SqlClient provider and the OleDb provider implement DataAdapters derived from a common base class, DbDataAdapter. Most custom providers, such as the ODBC data provider, also use this base class. System.Data.Common ...

Get Essential ADO.NET 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.