MDAC 2.5 SDK - OLE DB Providers
OLE DB Provider for Microsoft Jet


 

IRowset

IRowset is the base rowset interface. It provides methods for fetching rows sequentially, getting the data from those rows, and managing rows.

Cursor and Cursor Promotion

Cursor types can be promoted or demoted by the OLE DB Provider for Microsoft Jet. This cursor promotion or demotion is based on guessing the type of cursor requested by the user, with the cursor type being determined by the properties that are passed to the driver. Cursor types can be promoted without being requested by the user, because the driver itself will try to promote the cursor type if necessary. If the consumer asks for properties that don't match up with a particular cursor type, the promoted cursor that is provided to the consumer will be at the next cursor level above the minimum match. A consumer that calls ICommand::Execute with no properties, expecting the default behavior, will be given a forward-only snapshot.

Cursor types in order of precedence:

  1. Forward-only snapshot

  2. Snapshot

  3. Keyset

  4. Dynaset

  5. Append-only dynasets

Regular Rowset

Becoming a Zombie

Rowsets can become zombies if the internal resource on which they depend goes away because a transaction is aborted.

Data Type Coercion

This OLE DB provider supports all the data type coercions that exist in the OLE DB Coercion Library. For better performance, bind to the native data types.

By Reference Data Binding

This OLE DB provider does not support "by reference" data binding, only binding by value.

Delayed Update Mode

In delayed update mode, this provider supports at most one pending change at a time on a rowset.

BLOB Support

The OLE DB Provider for Microsoft Jet supports two kinds of structured storage interfaces: ISequentialStream and ILockBytes. ISequentialStream can be used for long text and long binary (memo and COM object) data types and must read the whole BLOB. ILockbytes works only on the Red ISAM 3.x and 4.x. ISequentialStream works on any BLOB data that Jet reads. You do not have to read the whole BLOB with ILockBytes; instead, it provides random access for the user.

There are restrictions on rowsets when using ILockBytes and ISequentialStream. If you have a structured storage interface open on a rowset, it might prevent you from editing a row in delayed update mode. You must release your pointers to structured interfaces to change other rows. Structured storage pointers can become invalid if you abort transactions, resulting in zombied rowsets.

IRowset::GetNextRows

Fetches rows sequentially, remembering the previous position. For information about how this interface is implemented, see the OLE DB Programmer's Reference.

Note   If possible, try to access rows sequentially by using this routine. This will minimize the amount of work that Jet has to do to move to new rows. That is, call GetNextRows(NULL, 0, 1…) to traverse through the rowset in your default behavior instead of using GetRowsAtBookmark.

IRowset::RestartPosition

Repositions the next fetch position used by GetNextRows or FindNextRow to its initial position—that is, its position when the rowset was first created. For information about how this interface is implemented, see the OLE DB Programmer's Reference.

Note   This is not an expensive operation on scrollable cursors, but it can cause query reexecution on nonscrollable cursors.