IDBInitialize::Uninitialize

OLE DB Programmer's Reference

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 object 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 IDBInitialize::Initialize or a new state loaded on a data source object, such as with IPersistFile::Load.

It is an error to call IDBInitialize::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 IDBInitialize::Uninitialize. It is not an error to call IDBInitialize::Uninitialize if IDBInitialize::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: Data Source and Session Objects.

See Also

IDBInitialize::Initialize

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