DBPROP_ACCESSORDER

OLE DB Programmer's Reference

Property group: Rowset

Property set: DBPROPSET_ROWSET

Column? N

Type: VT_I4

Typical R/W: R/W

Description: Access Order

Sets the order in which columns must be accessed by methods (such as IRowset::GetData, IRow::GetColumns, and IRow::Open) that operate on rowsets, rows, and streams.

Note   For optimal performance and interoperability, consumers should set this property to DBPROPVAL_AO_SEQUENTIALSTORAGEOBJECTS.

Value Meaning
DBPROPVAL_AO_RANDOM Columns can be accessed in any order.
DBPROPVAL_AO_SEQUENTIALSTORAGEOBJECTS Columns bound as storage objects can be accessed only in sequential order as determined by the column ordinal. Further, storage objects from one row must be retrieved before calling IRowset::GetData on any columns in any subsequent row. Calling IRowset::GetData on a column bound as a storage object returns DBSTATUS_E_UNAVAILABLE for any columns bound as storage objects if any of the following are true:
  • Columns beyond the column bound as a storage object are specified in the accessor.
  • Columns beyond the column bound as a storage object have been accessed in a previous call to IRowset::GetData for that row.
  • IRowset::GetData has been called for any columns on a row returned after the specified row.

Providers that never impose restrictions on column access ordering return DBPROPSTATUS_S_OK when this value is set. However, they upgrade the property to DBPROPVAL_AO_RANDOM such that calling IRowsetInfo::GetProperties continues to return DBPROPVAL_AO_RANDOM for this property.

DBPROPVAL_AO_SEQUENTIAL All columns must be accessed in sequential order determined by the column ordinal. Further, all columns from one row must be retrieved before calling IRowset::GetData on any columns in any subsequent row. Calling IRowset::GetData returns DBSTATUS_E_UNAVAILABLE for any columns for which any of the following are true:
  • The column is bound as a storage object, and columns beyond it are specified in the accessor.
  • Columns beyond the bound column have been accessed in a previous call to IRowset::GetData for that row.
  • IRowset::GetData has been called for any columns on a row returned after the specified row.

Providers that never impose restrictions on column access ordering return DBPROPSTATUS_S_OK when this value is set. However, they upgrade the property to DBPROPVAL_AO_RANDOM such that calling IRowsetInfo::GetProperties continues to return DBPROPVAL_AO_RANDOM for this property.

Providers may be able to optimize how data is retrieved if they know it will be read in column order. For instance, the provider may be able to read directly from a stream over the data if it knows the columns will be read in strictly sequential order, but may not be able to do so efficiently if the columns contain BLOBs that may be read in a random order.

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