IMetabaseObjectDescriptor.OpenWithParam

Fore Syntax

OpenWithParam(Values: Variant): IMetabaseObjectInstance;

Fore.NET Syntax

OpenWithParam(Values: Object): Prognoz.Platform.Interop.Metabase.IMetabaseObjectInstance;

Parameters

Values. Value of the parameter, which is used on opening the object.

Description

The OpenWithParam method opens the object and returns its data. It is relevant to use this method if the object has one parameter.

Example

Executing the example requires that the repository contains a query with the Query_1 identifier. This query was created with one parameter.

Sub Main;

Var

MB: IMetabase;

MObj: IMetabaseObject;

Inst: IDatasetInstance;

Fields: IDatasetInstanceFields;

Begin

MB := MetabaseClass.Active;

MObj := MB.ItemById("Query_1").Bind;

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 Main;

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:

IMetabaseObjectDescriptor