Progress
Language Reference
QUERY-OFF-END Function
Returns a logical value indicating whether the specified query is positioned at the end of its result list (either before the first record or after the last record).
SYNTAX
query-name
A character-string expression that evaluates to the name of a currently open query. If query-name does not resolve to the name of a query, or if the query is not open, then the function returns the unknown value (?).
EXAMPLEThe following example uses the QUERY-OFF-END function to determine when to leave the REPEAT loop.
When you run this procedure, all customer numbers and names are displayed. After the last record is displayed, the loop iterates and the GET NEXT statement reads beyond the last record. At this point QUERY-OFF-END returns TRUE and Progress exits the loop.
NOTE
To test whether a GET statement read beyond the last (or first) record pass a buffer to the AVAILABLE function. The QUERY-OFF-END function serves the same purpose, but does not require a specific buffer; it requires only a query name.
SEE ALSO
CLOSE QUERY Statement, CURRENT-RESULT-ROW Function, DEFINE BROWSE Statement, DEFINE QUERY Statement, GET Statement, NUM-RESULTS Function, OPEN QUERY Statement, REPOSITION Statement
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |