IMetabaseLink.UseMetabaseCredentials

Syntax

UseMetabaseCredentials: Boolean;

Description

The UseMetabaseCredentials property determines whether the credentials specified when entering to the current repository, will be used for connecting to the database.

Comments

The property is relevant if the IMetabaseLink.LoginPrompt property is set to False.

Available values:

Example

Executing the example requires the %METABASE_SERVER% server and the TestShema schema.

Add a link to the Metabase system assembly.

Sub UserProc;
Var
    MB: IMetabase;
    CrInfo: IMetabaseObjectCreateInfo;
    Link: IMetabaseLink;
Begin
    MB := MetabaseClass.Active;
    CrInfo := MB.CreateCreateInfo;
    CrInfo.ClassId := MetabaseObjectClass.KE_CLASS_METABASELINK;
    CrInfo.Id := "Link_1";
    CrInfo.Name := "Test1 repository connection";
    CrInfo.Parent := MB.Root;
    Link := MB.CreateObject(CrInfo).Edit As IMetabaseLink;
    Link.Authentication := AuthenticationMode.Password;
    Link.DriverId := "ORCL8";
    Link.SecurityPackage := "STANDARDSECURITYPACKAGE";
    Link.LogonData.ParamValue("SERVER") := "%METABASE_SERVER%";
    Link.LogonData.ParamValue("SCHEME") := "TestShema";
    Debug.WriteLine(Link.LoginPrompt);
    Link.LoginPrompt := False;
    Link.UseMetabaseCredentials := True;
    (Link As IMetabaseObject).Save;
End Sub UserProc;

After executing the example the new object Connection with Repository is created in the repository root. This object establishes connection with the repository that is placed in the TestShema scheme on the same server with the current repository. On using this method, the automatic connection to the scheme with the credentials that were specified when entering to the current repository, is established.

See also:

IMetabaseLink