IPrimaryMsSqlSPLD.FileGroup

Syntax

FileGroup: String;

Description

The FileGroup property determines a file group for creating tables.

Comments

By default, the DEFAULT value is used, meaning that, if a user name is not entered, the file group set in database properties by default should be used when connecting.

Example

To execute the example, add the Metabase system assembly to the unit.

Sub UserProc;
Var
    MbMan: IMetabaseManager;
    MbDefs: IMetabaseDefinitions;
    MbDef: IMetabaseDefinition;
    MsSqlSPLD: IPrimaryMsSqlSPLD;
Begin
    MbMan := MetabaseManagerFactory.Active;
    MbDefs := MbMan.Definitions;
    MbDef := MbDefs.Add;
    MbDef.DriverId := "MSSQL2008";
    MbDef.Id := "Test_MSSQL";
    MbDef.Name := "Test_MSSQL";
    MbDef.Authentication := AuthenticationMode.Password;
    MbDef.SecurityPackage := "STANDARDSECURITYPACKAGE";
    MsSqlSPLD := MbDef.LogonData As IPrimaryMsSqlSPLD;
    MsSqlSPLD.Server := "Test_MS";
    MsSqlSPLD.DatabaseOnly := "DB_Repository";
    MsSqlSPLD.SchemaOnly := "UserSchema";
    MsSqlSPLD.FileGroup := "file group on DB server";
    MbDef.Save;
End Sub UserProc;

After executing the example a new description of the repository is created. The UserSchema user schema in the specified database is used for connection. The MS SQL Server 2008 DBMS is used on the Test_MS server. The File Group on DB Server is used to create tables.

See also:

IPrimaryMsSqlSPLD