UseServiceLogonData: Boolean;
UseServiceLogonData: Boolean;
The UseServiceLogonData property determines whether connection settings for Foresight Analytics Platform Web service will be overridden.
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 Foresight Analytics Platform Web service.
Executing the 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 Foresight Analytics Platform Web service.
The requirements and result of the Fore.NET example execution match with those in the 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: