An ABL query acting as a data source can be either static or dynamic. The query can also represent a join between multiple tables. A query that is part of a ProDataSet is also a valid data source. Key benefits of using an ABL query as a data source are that it provides automatic updating, batching and currency control.
When binding a control to a query, PSC recommends use of the PRESELECT option on the query, which is an optimized means of providing the binding source with the query record count. For dynamic queries, the AVM enforces use of the PRESELECT option.
PSC also recommends that a query used as a data source be defined using the SCROLLING option. This option specifies that you can jump to a location within the list of records that satisfy the query by using the REPOSITION statement.