Condividi tramite


DBPROP_RESETDATASOURCE

Property group: Data Source

Property set: DBPROPSET_DATASOURCE

Type: VT_I4

Typical R/W: W

Description: Reset Datasource

Indicates the data source object state should be reset. The following value can be set:

  • DBPROPVAL_RD_RESETALL ? The provider should reset all initialization properties and other states associated with the data source and session objects to their values at initialization time, with the exception that any transactions, including distributed transactions, remain active. Any open rowsets or commands must be released by the consumer prior to setting this property, or the provider may return DBPROPSTATUS_NOTSETTABLE. After successfully setting DBPROP_RESETDATASOURCE to DBPROPVAL_RD_RESETALL, the data source object appears as it did when initialized, with the exception that any open session objects and their transaction states are maintained.

DBPROP_RESETDATASOURCE is generally used by a consumer to reuse an existing data source object without paying the cost of uninitializing and reinitializing the data source object.

If the data source object has a state that cannot be reset, the provider returns DBPROPSTATUS_NOTSET for this property, indicating that the data source object should not be reused. DBPROPSTATUS_NOTSET will also be returned if this property is set to DBPROPOPTIONS_REQUIRED because the state that cannot be reset takes precedence.

Other data source properties specified in the same call, regardless of their settings, are also reset.

The IDBProperties::GetProperties method always retrieves this property successfully and reports its value is zero.

If the data source object is being created from the resource pool, the Options field is automatically set to DBPROPOPTIONS_REQUIRED.

See Also

Reference

Properties (Alphabetical)