Progress
Programming
Handbook


Creating a Query Object

The query object corresponds to an underlying Progress query, which can be static or dynamic. A static query is one you define at compile time using the DEFINE QUERY statement. A dynamic query is one you create at run time using the QUERY option of the CREATE Widget statement.

The query object, like other Progress objects, is represented by a variable of type HANDLE. You can use a HANDLE variable to acquire a new query object for a dynamically-created query, as the following code fragment demonstrates:

DEFINE VARIABLE my-query-handle AS HANDLE.
CREATE QUERY my-query-handle.
... 

You can also use a HANDLE variable to acquire the query object of an existing statically-created query, as the following code fragment demonstrates:

DEFINE VARIABLE my-query-handle AS HANDLE.
DEFINE QUERY q1 FOR customer.
my-query-handle = QUERY q1:HANDLE.
... 


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095