IAdoMdCatalog.OpenWithCredentials

Syntax

OpenWithCredentials(Credentials: ICredentials): IAdoMdCatalogInstance;

Parameters

Credentials. Credentials, used to open the catalog.

Description

The OpenWithCredentials method opens the ADOMD catalog with specified credentials.

Example

Executing the example requires that the repository contains an ADOMD catalog with the SAP_test identifier.

Sub UserProc;
Var
    MB: IMetabase;
    SecPackage: ISecurityPackage;
    Creds: IPasswordCredentials;
    Catalog: IAdoMdCatalog;
    CatalogInst: IAdoMdCatalogInstance;
Begin
    MB := MetabaseClass.Active;
    Catalog := MB.ItemById("SAP_test").Bind As IAdoMdCatalog;
    SecPackage := New StandardSecurityPackage.Create;
    Creds := SecPackage.CreateCredentials(AuthenticationMode.Password) As IPasswordCredentials;
    Creds.UserName := "User";
    Creds.Password := "Password";
    CatalogInst := Catalog.OpenWithCredentials(Creds);
End Sub UserProc;

After executing the example the system opens the ADOMD catalog with specified credentials.

See also:

IAdoMdCatalog