Database: String;
Database: String;
The Database property determines a name of the database that stores repository data.
Add a link to the Metabase system assembly.
Sub UserProc;
Var
MbMan: IMetabaseManager;
MbDefs: IMetabaseDefinitions;
MbDef: IMetabaseDefinition;
VertSPLD: IPrimaryVerticaSPLD;
Begin
MbMan := MetabaseManagerFactory.Active;
MbDefs := MbMan.Definitions;
MbDef := MbDefs.Add;
MbDef.DriverId := "VERTICA";
MbDef.Id := "VERTICA";
MbDef.Name := "VERTICA";
MbDef.Authentication := AuthenticationMode.Password;
MbDef.SecurityPackage := "STANDARDSECURITYPACKAGE";
VertSPLD := MbDef.LogonData As IPrimaryVerticaSPLD;
VertSPLD.Server := "VERT_SRV";
VertSPLD.Database := "VERTICA";
VertSPLD.Scheme := "USERS";
VertSPLD.Port := "5433";
MbDef.Save;
End Sub UserProc;
Imports Prognoz.Platform.Interop.Metabase;
Public Shared Sub Main(Params: StartParams);
Var
MbManagerCls: MetabaseManagerFactory = New MetabaseManagerFactoryClass();
MbMan: IMetabaseManager;
MbDefs: IMetabaseDefinitions;
MbDef: IMetabaseDefinition;
VertSPLD: IPrimaryVerticaSPLD;
Begin
MbMan := MbManagerCls.Active;
MbDefs := MbMan.Definitions;
MbDef := MbDefs.Add();
MbDef.DriverId := "VERTICA";
MbDef.Id := "VERTICA";
MbDef.Name := "VERTICA";
MbDef.Authentication := AuthenticationMode.amPassword;
MbDef.SecurityPackage := "STANDARDSECURITYPACKAGE";
VertSPLD := MbDef.LogonData As IPrimaryVerticaSPLD;
VertSPLD.Server := "VERT_SRV";
VertSPLD.Database := "VERTICA";
VertSPLD.Scheme := "USERS";
VertSPLD.Port := "5433";
MbDef.Save();
End Sub;
After executing the example, a new repository description will be created.
See also: