CLOSE QUERY queryThe r-clsqry.p procedure defines a query, q-cust, which it shares with r-query.p. Each time you choose the Ascending, Descending, or CustNum button, the procedure opens a new query for q-cust. To do this, the procedure must first close an open query for each q-cust. Therefore, the CLOSE QUERY statement is used in the CHOOSE trigger for each of these buttons.
![]()
After you close a query, you can reopen it with the OPEN QUERY statement. However, you cannot reuse the query’s buffers for a different table. For example, a buffer, buff1, is created for the customer table in a DEFINE QUERY or OPEN QUERY for the query, qry1. The query is run and closed. You cannot now DEFINE or OPEN qry1 with buff1 for the item table. You can reuse buffers with CREATE QUERY, but you must re‑run QUERY-PREPARE.
![]()
If you do not explicitly close a query, it is closed when another OPEN QUERY statement is executed for the same query name.
© 2013 Progress Software Corporation and/or its subsidiaries or affiliates. |