Share via


Rowset Programming and Object Model

The tasks in the Rowset programming model are as follows:

  1. Identify the data source object.

  2. Establish a context for transactions, subsequent tasks, and a means of retrieving data if the provider doesn't support commands.

  3. Create and execute data access commands (if commands are supported).

  4. Receive, hold, and manipulate the data in a cache (if a command requests data).

  5. If the data represents a container such as a file system directory, hold and manipulate the container and, optionally, its contents.

  6. Handle any errors that occur.

The Rowset programming model is represented by the following object creation hierarchy:

  1. The enumerator object creates the data source object. (The enumerator object is optional because there are several ways to create a data source object.)

  2. The data source object creates a session object.

  3. The session object optionally creates a command object.

  4. The session or command object creates a rowset object.

  5. The rowset object creates a row object.

  6. The row object creates a stream object. (If the row object represents a collection, such as a file system directory, it can create other rowset, row, or stream objects that represent the contents of the collection.)

Note

Because any object can create an error object, the error object is shown as an autonomous entity in the preceding illustration.

The following topics take a closer look at the OLE DB objects and their role in the Rowset programming model:

See Also

Concepts

Overview of OLE DB