IMDCalculationCalculateArgs.AutoSaveSQL

Syntax

AutoSaveSQL: TriState;

Description

The AutoSaveSQL property determines whether an executed SQL query is automatically saved to a file.

Comments

If the property is set to TriState.OnOption, SQL query is automatically saved in the c:\p5sq0.txt file. If this file already exists, it is overwritten.

Example

Executing the example requires that the repository contains multidimensional calculation on database server with the MDCalc_1 identifier.

Sub UserProc;
Var
    MB: IMetabase;
    MDInst: IMDCalculationInstance;
    Args: IMDCalculationCalculateArgs;
Begin
    MB := MetabaseClass.Active;
    MDInst := MB.ItemById("MDCalc_1").Open(NullAs IMDCalculationInstance;
    Args := MDInst.CreateCalculateArgs;
    Args.CleanType := MDCalculateArgsCleanType.All;
    Args.UpdateType := MDCalculateArgsUpdateType.None;
    Args.AutoSaveSQL := TriState.OnOption;
    MDInst.Calculate(Args);
End Sub UserProc;

After executing the example multidimensional calculation is executed on DB server. The data consumer is cleared before calculation. The text of executed SQL query is saved to the file.

See also:

IMDCalculationCalculateArgs