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 DB server with the MDCalc_1 identifier.

Sub Main;

Var

MB: IMetabase;

MDInst: IMDCalculationInstance;

Args: IMDCalculationCalculateArgs;

Begin

MB := MetabaseClass.Active;

MDInst := MB.ItemById("MDCalc_1").Open(Null) As IMDCalculationInstance;

Args := MDInst.CreateCalculateArgs;

Args.CleanType := MDCalculateArgsCleanType.None;

Args.UpdateType := MDCalculateArgsUpdateType.All;

Args.AutoSaveSQL := TriState.OnOption;

MDInst.Calculate(Args);

End Sub Main;

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

See also:

IMDCalculationCalculateArgs