IRepOLEDBScanner::ScanConnection
IRepOLEDBScanner::ScanConnection copies the schema from the connected OLE DB session object into the specified repository. If the catalog is already in the specified repository, the system will create a versioned copy of the original schema.
Syntax
HRESULT ScanConnection (
IRepository * pRepository,
IRepositoryObject **pDbmDataSource,
IUnknown * pSession,
BSTR szCatalog
);
Parameters
pRepository [in]
A pointer to an IRepository interface that represents the repository where the class instances will be stored.
pDbmDataSource [in, out]
A pointer to an interface for a repository data source object. If the object does not support the IDbmDataSource interface, the scanner will create the data source object and assign the pointer to the newly created object.
pSession [in]
An interface pointer to an initialized OLE DB session object. The scan is not possible if the session does not support schema information through the IDBSchemaRowset interface. Appropriate initialization properties should already be set on the session.
szCatalog [in, optional]
A provider-specific database name. If the database name is not specified, the current or default catalog in the data source will be scanned.
Return Value
S_OK
The method succeeded.
E_FAIL
A provider-specific error occurred.
E_INVALIDARG
Either pRepository, pDbmDataSource, or pSession was a null pointer.