AutoSaveSQL: TriState;
The AutoSaveSQL property determines whether an executed SQL query is automatically saved to a file.
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.
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(Null) As 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: