Database: String;
The Database property determines an identifier of the database on the PostgreSQL server, in which the repository is created.
To execute the example, add a link to the Metabase system assembly.
Sub UserProc;
Var
MbMan: IMetabaseManager;
MbDefs: IMetabaseDefinitions;
MbDef: IMetabaseDefinition;
PostgreSPLD: IPrimaryPostgresSPLD;
Begin
// Add a new repository connection
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;
PostgreSPLD.CaseSensitive := True;
// Save changes
MbDef.Save;
End Sub UserProc;
After executing the example a new repository description is created. The schema, to which the connection is established, is located on the Server server, which uses PostgreSQL DBMS. The server will be addressed using binary requests taking into account case of repository name, identifiers of objects and their fields in DBMS.
See also: