IDatabase.UseServiceLogonData

Fore Syntax

UseServiceLogonData: Boolean;

Fore.NET Syntax

UseServiceLogonData: Boolean;

Description

The UseServiceLogonData property determines whether connection settings for Prognoz Platform Web service will be overridden.

Comments

By default the property has the False value, and settings of the current repository or overridden settings specified in the LogonData property are used, if the UseMetabaseLogonData property has the True value.

If the UseServiceLogonData property has the True value then the LogonData property can be cast to the IPrimaryServiceSPLD type and specify connection parameters for the Prognoz Platform Web service.

Fore example

Executing this example requires that the repository contains a database with the DBWeb identifier.

Sub UserProc;
Var
    MB: IMetabase;
    MObj: IMetabaseObject;
    DB: IDatabase;
    LogonData: IPrimaryServiceSPLD;
Begin
    MB := MetabaseClass.Active;
    MObj := MB.ItemById("DBWeb").Edit;
    DB := MObj As IDatabase;
    DB.UseMetabaseLogonData := False;
    DB.Authentication := AuthenticationMode.Password;
    DB.DriverId := "WSF";
    LogonData := DB.LogonData As IPrimaryServiceSPLD;
    LogonData.Endpoint := "http://test-srv:9090/axis2/services/PP.SOM.Som";
    LogonData.Metabase := "PPRepository";
    MObj.Save;
End Sub UserProc;

On executing the example connection parameters for specified database will be overridden. Connection is performed via specified Prognoz Platform Web service.

Fore.NET example

Requirements and result of Fore.NET execution match Fore example.

Imports Prognoz.Platform.Interop.Db;
Imports Prognoz.Platform.Interop.Metabase;

Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    MObj: IMetabaseObject;
    DB: IDatabase;
    LogonData: IPrimaryServiceSPLD;
Begin
    MB := Params.Metabase;
    MObj := MB.ItemById["DBWeb"].Edit();
    DB := MObj As IDatabase;
    DB.UseMetabaseLogonData := False;
    DB.Authentication := AuthenticationMode.amPassword;
    DB.DriverId := "WSF";
    LogonData := DB.LogonData As IPrimaryServiceSPLD;
    LogonData.Endpoint := "http://test-srv:9090/axis2/services/PP.SOM.Som";
    LogonData.Metabase := "PPRepository";
    MObj.Save();
End Sub;

See also:

IDatabase