MDAC 2.5 SDK - OLE DB Programmer's Reference
Appendix C: OLE DB Properties
DBPROP_ROWSET_ASYNCH
Property group: Rowset
Property set: DBPROPSET_ROWSET
Type: VT_I4
Typical R/W: R/W
Description: Asynchronous Rowset Processing
A bitmask specifying the asynchronous processing performed on the rowset. A combination of zero or more of the following:
- DBPROPVAL_ASNYCH_INITIALIZE—The rowset is initialized asynchronously. The method requesting the rowset returns immediately, but attempting to call any interface other than IConnectionPointContainer to obtain the IID_IDBAsynchNotify connection point may fail and the full set of interfaces may not be available on the rowset until asynchronous initialization has completed.
- DBPROPVAL_ASNYCH_SEQUENTIALPOPULATION—The rowset is sequentially asynchronously populated; requests for rows may return DB_S_ENDOFROWSET before the end of the rowset is actually reached. Asynchronously populated rows are always added to the end of the rowset.
- DBPROPVAL_ASNYCH_RANDOMPOPULATION—The rowset is randomly asynchronously populated; requests for rows may return DB_S_ENDOFROWSET before the end of the rowset is actually reached. Asynchronously populated rows may be inserted anywhere in the rowset.
The consumer may set both DBPROPVAL_ASNYCH_SEQUENTIALPOPULATION and DBPROPVAL_ASNYCH_RANDOMPOPULATION bits to request that the rowset be asynchronously populated either sequentially or randomly. The consumer is prepared for asynchronous notifications in IRowsetNotify::OnRowChange as well as from IDBAsynchStatus. Only one property is returned by the rowset; if the rowset is asynchronously populated, it returns either DBPROPVAL_ASNYCH_RANDOM or DBPROPVAL_ASNYCH_SEQUENTIAL.
If no bits are set (the default), the rowset is initialized and populated synchronously. All requested interfaces are available when the method requesting the rowset returns, and requesting rows block until the requested number of hRows are obtained or the end of the rowset is reached.
- DBPROPVAL_ASYNCH_BACKGROUNDPOPULATION—The rowset is to be populated asynchronously in the background. The rowset supports IDBAsynchStatus to get information about the population of the rowset or abort background population and may support the connection point for IDBAsynchNotify to give status of the background population. DBPROPVAL_ASYNCH_BACKGROUNDPOPULATION is implied by DBPROPVAL_ASYNCH_SEQUENTIALPOPLUATION and DBPROPVAL_ASYNCH_RANDOMPOPULATION; however, if DBPROPVAL_ASYNCH_SEQUENTIALPOPLUATION or DBPROPVAL_ASYNCH_RANDOMPOPLUATION is not also set, the rowset appears to the consumer as if it were being populated synchronously in that requesting rows will always block until the requested number of hRows are obtained or the end of the rowset is reached.
- DBPROPVAL_ASYNCH_PREPOPULATE—The consumer prefers to optimize for retrieving all data when the rowset is materialized. This is a hint to the provider to fetch all of the data up-front. DBPROPVAL_ASYNCH_PREPOPULATE is only a hint to the provider; the provider should never fail opening the rowset based on the setting of this flag and need not return it to the consumer, even if the rowset is prepopulated.
- DBPROPVAL_ASYNCH_POPULATEONDEMAND—The consumer prefers to optimize for getting each individual request for data returned as quickly as possible. This is a hint to the provider to populate the rowset as the data is fetched. DBPROPVAL_ASYNCH_POPULATEONDEMAND is only a hint to the provider; the provider should never fail opening the rowset based on the setting of this flag and need not return it to the consumer, even if the rowset is populated on demand.
Because DBPROPVAL_ASYNCH_PREPOPULATE and DBPROPVAL_ANSYCH_POPULATEONDEMAND are just hints to the provider, if the consumer sets one or both of these properties in addition to the asynchronous population properties DBPROPVAL_ASYNCH_SEQUENTIALPOPULATION or DBPROPVAL_ASYNCH_RANDOMPOPULATION, the provider should attempt to populate asynchronously according to DBPROPVAL_ASYNCH_SEQUENTIALPOPULATION and DBPROPVAL_ASYNCH_RANDOMPOPULATION. If the asynchronous population specified by DBPROPVAL_ASYNCH_SEQUENTIALPOPULATION or DBPROPVAL_ASYNCH_RANDOMPOPULATION cannot be supported, the provider should fail if DBPROPOPTIONS_REQUIRED was specified for the property or should attempt to populate synchronously according to DBPROPVAL_ASYNCH_PREPOPULATE or DBPROPVAL_ASYNCH_POPULATEONDEMAND if the property was set with DBPROPOPTIONS_OPTIONAL.