IRepOLEDBScanner::ScanDB

Meta Data Services Programming

Meta Data Services Programming

IRepOLEDBScanner::ScanDB

IRepOLEDBScanner::ScanDB copies the schema from the specified OLE DB data source object into a specified repository. If the catalog is already in the specified repository, the systemwill version and store the original schema.

Syntax

HRESULT ScanDB (      IRepository * pRepository,
     IRepositoryObject **pDbmDataSource,
     BSTR szProviderName,
     BSTR szProviderString,
     BSTR szDataSource,
     BSTR szCatalog,
     BSTR szUserName,
     BSTR szPassword
);

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.

szProviderName [in]

The OLE DB provider name or program identifier.

szProviderString [in, optional]

A provider-specific connection string for the scanner to use during provider initialization.

szDataSource [in, optional]

A provider-specific location of the data source.  Typically, this will be a server name or the path of the database file.

szCatalog [in, optional]

A provider-specific database name. If the database name is not specified, the default catalog in the data source will be scanned.

szUserName [in, optional]

The database user name for login. If the user name is specified in the connect string, this parameter is not required.

szPassword [in, optional]

The user password for authentication. If the user name is specified in the connect string, this parameter is not required.

Return Value

S_OK

The method succeeded.

E_FAIL

A provider-specific error occurred.

E_INVALIDARG

Either pRepository or pDbmDataSource is a null pointer.