IMetabaseObjectParamValues.Item

Syntax

Item(Index: Integer): IMetabaseObjectParamValue;

Parameters

Index. Index of the parameter, which value should be addressed.

Description

The Item property returns the parameter value.

Example

Executing the example requires that repository contains a query with the Query_1 identifier. This query is created with two parameters.

Sub Main;
Var
    MB: IMetabase;
    MObj: IMetabaseObject;
    Params: IMetabaseObjectParamValues;
    Inst: IDatasetInstance;
    Fields: IDatasetInstanceFields;
Begin
    MB := MetabaseClass.Active;
    MObj := MB.ItemById("Query_1").Bind;
    Params := MObj.ParamValues;
    Params.Item(0).Value := 100;
    Params.Item(1).Value := 300;
    Inst := MObj.Open(Params) As IDatasetInstance;
    Fields := Inst.Fields;
    While Not Inst.Eof Do
        Debug.WriteLine(Fields.Item(0).Value);
        Inst.Next;
    End While;
End Sub Main;

After executing the example the query with the specified values of parameters is opened. Values of the first data column obtained on execution of the query are displayed in the development environment console.

See also:

IMetabaseObjectParamValues