Creating and Releasing Rowsets

The consumer typically uses one of two procedures for creating rowsets. The first procedure uses the IOpenRowset interface, which deals with the simpler case of retrieving all data from the table. The second procedure involves creating and executing a command to get a rowset that meets specific criteria. All providers must implement the simpler case. Even if the rowset specified by either method has no rows, the rowset is still created. The resulting rowset is fully functional and can be used, for example, to insert new rows or determine column metadata.

Because rowsets are the fundamental objects for getting data, several methods that return information create rowsets, such as IColumnsRowset::GetColumnsRowset, IDBSchemaRowset::GetRowset, and ISourcesRowset::GetSourcesRowset.