Open method: Query class

Syntax

Open(QueryName, Public, Update)

Description

The Open method opens the query object specified by the parameters. The Open method can be used only with a closed query, it cannot be used on an open query. You cannot read or set any properties of a query until after you open it.

Parameters

Parameter Description

QueryName

Specify the name of the query to be opened. You must specify an existing query. This parameter takes a string value.

Public

Specify if the query is public or private. This parameter takes a Boolean value: True if the query is public, False if it's a private query.

Update

This parameter is required, but is unused in this release. You must specify a either True or False.

Returns

An integer value: 0 means the query was opened successfully.

Considerations for Opening Different Types of Queries

When you use the Open method, the system tries to open queries according to the type of query. The following is the order used for searching for the query to open:

  1. Query (User)

  2. View

  3. Role

  4. Process

  5. Archive

All query names are unique. You can't have two queries with the same name, just of different types.