22.7. Working with Data Adapters

Now that you understand the ins-and-outs of manipulating ADO.NET DataSets manually, it's time to turn your attention to the topic of data adapter objects. A data adapter is a class used to fill a DataSet with DataTable objects; this class can also send modified DataTables back to the database for processing. Table 22-8 documents the core members of the DbDataAdapter base class, the common parent to every data adapter object (e.g., SqlDataAdapter and OdbcDataAdapter).

Table 22.8. Core Members of the DbDataAdapter Class
MembersMeaning in Life
Fill()Executes a SQL SELECT command (as specified by the SelectCommand property) to query the database for data and loads the data into a DataTable.
SelectCommand

InsertCommand ...

Get Pro C# 2010 and the .NET 4 Platform, Fifth Edition 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.