Returns the data source object or enumerator to an uninitialized state.
HRESULT Uninitialize();
Parameters
None.
Return Code
S_OK
The method succeeded.
E_FAIL
A provider-specific error occurred.
E_UNEXPECTED
The data source is in the process of being initialized asynchronously. To cancel asynchronous initialization, call IDBAsynchStatus::Abort.
DB_E_OBJECTOPEN
There were open sessions, commands, or rowsets on the data source object.
Comments
The consumer is not required to uninitialize a data source object or enumerator before releasing it, but may use this method to release the state associated with the data source object or enumerator so that it can be reinitialized with Initialize or a new state loaded on a data source object, such as with IPersistFile::Load.
It is an error to call Uninitialize when there are open sessions, commands, or rowsets on the data source object; that is, the consumer must release all interface pointers on all sessions, commands, and rowsets on the data source object before calling Uninitialize. It is not an error to call Uninitialize if Initialize has not been called.
For information about what the consumer can and cannot do with a data source object or enumerator that is uninitialized, see "Data Source Object States" and "Enumerator States" in Chapter 2.
See Also