MDAC 2.5 SDK - OLE DB Programmer's Reference
OLE DB Interfaces


 

IDBDataSourceAdmin::DestroyDataSource

Destroys the current data source object.

HRESULT DestroyDataSource ();

Parameters

None.

Return Code

S_OK

The method succeeded.

E_FAIL

A provider-specific error occurred.

E_UNEXPECTED

The data source object was in an uninitialized state.

DB_E_NOTSUPPORTED

The provider does not support this method.

DB_SEC_E_PERMISSIONDENIED

The consumer did not have permission to destroy the current data source object.

Comments

IDBDataSourceAdmin::DestroyDataSource destroys the current data source object. Any open OLE DB objects on this data source, such as sessions, commands, rowsets, rows, and views, must be released before calling this method. Consumers cannot destroy a data source if they have not successfully connected to the provider by initializing the data source.

See Also

IDBDataSourceAdmin::CreateDataSource