IPrimarySQLiteSPLD.FileName

Fore Syntax

FileName: String;

Fore.NET Syntax

FileName: String;

Description

The FileName property determines path and name of the file that stores repository data.

Fore Example

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

Sub UserProc;
Var
    MbMan: IMetabaseManager;
    MbDefs: IMetabaseDefinitions;
    MbDef: IMetabaseDefinition;
    SQLiteSPLD: IPrimarySQLiteSPLD;
Begin
    MbMan := MetabaseManagerFactory.Active;
    MbDefs := MbMan.Definitions;
    MbDef := MbDefs.Add;
    MbDef.DriverId := "SQLITE";
    MbDef.Id := "SQLITE_REPO";
    MbDef.Name := "SQLITE_REPO";
    MbDef.SecurityPackage := "STANDARDSECURITYPACKAGE";
    SQLiteSPLD := MbDef.LogonData As IPrimarySQLiteSPLD;
    SQLiteSPLD.FileName := "C:\Work\sqlite_repo";
    MbDef.Save;
End Sub UserProc;

A new description of the repository is created after executing this example. The repository, to which connection is established, is based on SQLite DBMS and is located in the specified local file.

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;
    SQLiteSPLD: IPrimarySQLiteSPLD;
Begin
    MbMan := MbManClass.Active;
    MbDefs := MbMan.Definitions;
    MbDef := MbDefs.Add();
    MbDef.DriverId := "SQLITE";
    MbDef.Id := "SQLITE_REPO";
    MbDef.Name := "SQLITE_REPO";
    MbDef.SecurityPackage := "STANDARDSECURITYPACKAGE";
    SQLiteSPLD := MbDef.LogonData As IPrimarySQLiteSPLD;
    SQLiteSPLD.FileName := "D:\Work\sqlite_repo";
    MbDef.Save();
End Sub;

See also:

IPrimarySQLiteSPLD