IMetabaseDefinitions.Add

Syntax

Add: IMetabaseDefinition;

Description

The Add method adds a new description of the repository.

Example

Example

Sub Main;
Var
    Man: IMetabaseManager;
    Defs: IMetabaseDefinitions;
    Def: IMetabaseDefinition;
Begin
    Man := MetabaseManagerFactory.Active;
    Defs := Man.Definitions;
    Def := Defs.Add;
    Def.Id := "TestDefinition";
    Def.Name := "TestDefinition";
    Def.Authentication := AuthenticationMode.Password;
    Def.DriverId := "ORCL8";
    Def.SecurityPackage := "STANDARDSECURITYPACKAGE";
    Def.LogonData.ParamValue("SERVER") := "Test";
    Def.LogonData.ParamValue("SCHEME") := "TestShema";
    Def.Scope := MetabaseDefinitionScope.LocalMachine;
    Def.Save;
End Sub Main;

A new description of the repository is created after executing this example. The repository data is stored on the Test server in the TestShema scheme. Password authentication, DBMS type installed on the server Oracle 9.x or later are used on connection. This description will be available to all users of the operating system.

See also:

IMetabaseDefinitions