MDAC 2.5 SDK - OLE DB Programmer's Reference
Chapter 11: Integrated Indexes


 

Rowset Order

An index implies an order in which a base table is to be traversed. With nonintegrated indexes, this order is entirely contained in the index rowset. The consumer imposes this order on the base table rowset by reading the index rowset sequentially and fetching rows in the base table rowset by bookmark.

With integrated indexes, this order is imposed directly on the base table rowset. The methods that require a rowset order (IRowset::GetNextRows, IRowsetLocate::GetRowsAt, and IRowsetScroll::GetRowsAtRatio) fetch rows in the order specified by the current index. For IRowset::GetNextRows, this means that repeated calls will traverse the entire rowset in index order. For IRowsetLocate::GetRowsAt and IRowsetScroll::GetRowsAtRatio, this means that the method will start at the specified row and, if more than one row is requested, it will fetch rows in index order. IRowsetLocate::GetRowsByBookmark is not affected because it fetches only single, isolated rows.

If there is no current index (the base table rowset was opened without an index), these methods traverse the rowset in an undefined order, typically in the order that data is stored in the base table.