GetQueryList

Description

Returns the specified list of workspace queries known to the database.

This method returns the pathnames of the public or personal queries defined in the HCL Compass workspace. The querytype parameter lets you specify the type of queries to return. Specifying the constant OLEWKSPCSYSTEMQUERIES (1)returns only the public queries defined by the HCL Compass administrator. Specifying the constant OLEWKSPCBOTHQUERIES (3)returns a list of all of the queries in the workspace (including those of all users).

To return only the queries defined by a particular user, you must first set the current user name by calling the SetUserName method. You can then call this method, specifying the constant OLEWKSPCUSERQUERIES (2) for the querytype parameter.

Note: You must first call the SetSession method of the Workspace Object, if you have not created a Session object.

Syntax

VBScript


workspace.GetQueryList querytype 

Perl


$workspace->GetQueryList(querytype); 
Identifier
Description
workspace
The Workspace object obtained from the current session.
querytype
The type of queries to return.
  1. public queries
  2. personal queries
  3. all public and personal queries

For Visual Basic, this value corresponds to one of the WorkspaceQueryType constants.

Return value
For Visual Basic, an array of Variants (each containing a string) that make up the list of query definition names known to the database. Each item contains the pathname of a single query.

For Perl, a reference to an array of strings, each of which contains the pathname of a single query.