IPrimaryPostgresSPLD.Database

Fore Syntax

Database: String;

Fore.NET Syntax

Database: String;

Description

The Database property determines the identifier of the database on the PostgreSQL server in which the repository is created.

Fore Example

To execute the example, add a link to the Metabase system assembly.

Sub UserProc;
Var
    MbMan: IMetabaseManager;
    MbDefs: IMetabaseDefinitions;
    MbDef: IMetabaseDefinition;
    PostgreSPLD: IPrimaryPostgresSPLD;
Begin
    MbMan := MetabaseManagerFactory.Active;
    MbDefs := MbMan.Definitions;
    MbDef := MbDefs.Add;
    MbDef.DriverId := "POSTGRES";
    MbDef.Id := "Test_PostgreSQL";
    MbDef.Name := "Test_PostgreSQL";
    MbDef.Authentication := AuthenticationMode.Password;
    MbDef.SecurityPackage := "STANDARDSECURITYPACKAGE";
    PostgreSPLD := MbDef.LogonData As IPrimaryPostgresSPLD;
    PostgreSPLD.Server := "Server";
    PostgreSPLD.Database := "PPTest";
    PostgreSPLD.SupportBinaryProtocol := True;
    MbDef.Save;
End Sub UserProc;

A new description of the repository is created after executing this example. The schema to which the connection is established is located on the "Server" server, which uses the PostgreSQL DBMS. On calling the server, the binary queries are used.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

Imports Prognoz.Platform.Interop.Metabase;

Public Shared Sub Main(Params: StartParams);
Var
    MbManClass: MetabaseManagerFactoryClass = New MetabaseManagerFactoryClass();
    MbMan: MetabaseManager;
    MbDefs: IMetabaseDefinitions;
    MbDef: IMetabaseDefinition;
    PostgreSPLD: IPrimaryPostgresSPLD;
Begin
    MbMan := MbManClass.Active;
    MbDefs := MbMan.Definitions;
    MbDef := MbDefs.Add();
    MbDef.DriverId := "POSTGRES";
    MbDef.Id := "Test_PostgreSQL";
    MbDef.Name := "Test_PostgreSQL";
    MbDef.Authentication := AuthenticationMode.amPassword;
    MbDef.SecurityPackage := "STANDARDSECURITYPACKAGE";
    PostgreSPLD := MbDef.LogonData As IPrimaryPostgresSPLD;
    PostgreSPLD.Server := "Server";
    PostgreSPLD.Database := "PPTest";
    PostgreSPLD.SupportBinaryProtocol := True;
    MbDef.Save();
End Sub;

See also:

IPrimaryPostgresSPLD