Rowset Programming and Object Model

OLE DB Programmer's Reference

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 hierarchy of objects shown in the following illustration:

In the preceding illustration, the object creation hierarchy is as follows:

  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:

  • Enumerator Objects
  • Data Source Objects
  • Session Objects
  • Command Objects
  • Rowset Objects
  • Row and Stream Objects
  • Error Objects

1998-2001 Microsoft Corporation. All rights reserved.



Microsoft Ole Db 2.0 Programmer's Reference and Data Access SDK
Microsoft OLE DB 2.0 Programmers Reference and Data Access SDK (Microsoft Professional Editions)
ISBN: 0735605904
EAN: 2147483647
Year: 1998
Pages: 1083

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net