ITableField.IsSparse

Fore Syntax

IsSparse: Boolean;

Fore.NET Syntax

IsSparse: boolean;

Description

The IsSparse property returns whether sparse columns are used to store data

Comments

Available values:

Fore Example

Executing the example requires that the repository contains a table with the T_ISSPARSE identifier containing a field with the OBT field.

Add links to the Db and Metabase system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    Table: ITable;
    Field: ITableField;
Begin
    MB := MetabaseClass.Active;
    // Get table
    Table := MB.ItemById("T_ISSPARSE").Edit As ITable;
    // Get the OBT field
    Field := Table.Fields.FindById("OBT");
    Field.IsSparse := True;
    (Table As IMetabaseObject).Save;
End Sub UserProc;

After executing the example the OBT field will use sparse columns to store data.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

Imports Prognoz.Platform.Interop.Db;

Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    Table: ITable;
    Field: ITableField;
Begin
    MB := Params.Metabase;
    // Get table
    Table := MB.ItemById["T_ISSPARSE"].Edit() As ITable;
    // Get the OBT field
    Field := Table.Fields.FindById("OBT");
    Field.IsSparse := True;
    (Table As IMetabaseObject).Save();
End Sub;

See also:

ITableField