Value: Variant;
The Value property determines a parameter value.
Executing the example requires that the 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;
The query with the specified values of parameters is opened after executing this example. Values of the first data column received while execution of the query are displayed in the development environment console.
See also: