OpenWithParam(Values: Variant): IMetabaseObjectInstance;
Values. Value of the parameter, which is used on opening the object.
The OpenWithParam method opens the object and returns its data.
It is relevant to use this method if the object has one parameter.
Executing the example requires that the repository contains a query with the Query_1 identifier. This query was created with one parameter.
Add links to the Db and Metabase system assemblies.
Sub UserProc;
Var
MB: IMetabase;
MObj: IMetabaseObjectDescriptor;
Inst: IDatasetInstance;
Fields: IDatasetInstanceFields;
Begin
MB := MetabaseClass.Active;
MObj := MB.ItemById("Query_1");
Inst := MObj.OpenWithParam(100) As IDatasetInstance;
Fields := Inst.Fields;
While Not Inst.Eof Do
Debug.WriteLine(Fields.Item(0).Value);
Inst.Next;
End While;
End Sub UserProc;
The query with the specified value of parameter 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: