IQuery.SubstituteAllParamsInQuery

Syntax

SubstituteAllParamsInQuery: Boolean;

Description

The SubstituteAllParamsInQuery property determines whether all parameters values to query body on execution.

Comments

Available values:

Example

Executing the example requires that repository contains a query with the QUERY identifier. The query must contain parameters and query textwhere the parameters are used.

Add links to the Db and Metabase system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    MObj: IMetabaseObject;
    Query: IQuery;
Begin
    MB := MetabaseClass.Active;
    
// Get query
    MObj := Mb.ItemById("QUERY").Edit;
    Query := MObj 
As IQuery;
    
// Check whether parameters are taken into account on query execution
    If Query.ParamsCheck Then
        
// Determine substitution of all parameters values on query execution
        Query.SubstituteAllParamsInQuery := True;
        
// Save changes
        MObj.Save;
    
End If;
End Sub UserProc;

After executing the example, all parameters values will be placed to query body on its execution, therefore query execution time will reduce.

See also:

IQuery