MDAC 2.5 SDK - OLE DB Programmer's Reference
OLE DB Interfaces


 

IViewSort

IViewSort enables the consumer to apply a sort order to a view.

When to Implement

Providers that can present rows in a sorted order as specified by the consumer support IViewSort. A provider may restrict functionality to orders based on existing indexes or may limit the complexity of the order.

When to Call

Consumers needing a sorted view of rows call IViewSort::SetSort to apply a sort order to a view.

When a view with a specified sort order is applied to a rowset by calling IViewChapter::OpenViewChapter, a chapter handle is returned and methods that return HROWs, such as IRowset::GetNextRows or IRowsetScroll::GetRowsAtRatio using that chapter handle, return the rows in sorted order. Any resources associated with the order can be freed with a call to IChapteredRowset::ReleaseChapter.

Method Description
GetSortOrder Retrieves a sort order from a view.
SetSortOrder Assigns a sort order to a view.