Run method: CONQRSMGR class

Syntax

Run(Prompts, runProcessInfo)

Description

Use this method to run the connected query. The Run method is valid for the following run modes only:

  • RunMode_Prev — Referred to as preview mode.

  • RunMode_Sched_Web or RunMode_Sched_File — Referred to as scheduled mode.

If an error results, the Run method populates an error string with error details.

Parameters

Parameter Description

Prompts

Specifies the prompts for execution of the queries as an array of QUERYITEMPROMPT objects. This parameter should be set to null when running in scheduled mode.

runProcessInfo

Specifies the scheduling information for running the queries as a SCHED_INFO object. This parameter must be null when running in preview mode.

Returns

A Boolean value: True if the connected query was run successfully, False otherwise.

Preview Mode

In preview mode, the connected query is run immediately on the application sever. The output data is displayed in a separate browser window. In preview mode, the  Prompts parameter is required; the runProcessInfo parameter must be set to Null. The Prompts parameter should be retrieved using the QueriesPromptsArray property. If this array length is greater than 0, this array must be populated.

Note:

If both parameters are not null, the scheduling information is used to run the connected query by Process Scheduler.

Scheduled Mode

In scheduled mode, the connected query is run by Process Scheduler. In the case of RunMode_Sched_File, the output data is written to an XML file. In the case of RunMode_Sched_Web, the output data is accessible via a hyperlink in Process Monitor. In scheduled mode, the  runProcessInfo parameter is required; the Prompts parameter should be set to Null.

Note:

If both parameters are not null, the scheduling information is used to run the connected query by Process Scheduler.