DekGenius.com
Team LiB
Previous Section Next Section

Where is the Recordset?

Finally, it is very important for ADO programmers to understand where their favorite Recordset object has gone. As the following table illustrates, the functionality provided by the Recordset object is actually shared among several ADO .NET objects.

ADO .NET Object

Description

DataReader

Provides a forward-only and read-only row set of data from a data source. The DataReader is similar to a Recordset object with its CursorType property set to adOpenForwardOnly and its LockType property set to adLockReadOnly.

DataSet

Provides client access to relational data. This object is independent of any specific data source and therefore can be populated from multiple and differing data sources, including relational databases and XML, or can be populated with data local to the application. Data is stored in a collection of one or more table-like structures called DataTables and can be accessed non-sequentially and without limits to availability, unlike ADO in which data must be accessed a single row at a time. A DataSet can contain relationships between tables, similar to the ADO Recordset in which a single result set is created from a JOIN. A DataSet can also contain unique, primary key, and foreign key constraints on its tables. The DataSet is similar to a Recordset with CursorLocation = adUseClient, CursorType = adOpenStatic, and LockType = adLockOptimistic. However, the DataSet has extended capabilities over the Recordset for managing application data.

DataAdapter

Populates a DataSet with data from a relational database and resolves changes in the DataSet back to the data source.
The DataAdapter enables you to explicitly specify behavior that the Recordset performs implicitly.

Team LiB
Previous Section Next Section