The OFF-END event occurs when you position a query on
a ProDataSet temp-table buffer past the last row. You can use this
event to retrieve additional data source rows to add at the bottom
of a ProDataSet temp-table (for example, in batches when there are
too many data source rows to retrieve at one time).
The OFF-END event can also occur when the user performs a keyboard or mouse action in a
browse that scrolls off the end (past the last row) of a browse on a ProDataSet temp-table
buffer. For more information about using the OFF-END event with a browse, see High-level widget events.
The OFF-END event is similar to the QUERY-OFF-END attribute
, which is set to TRUE whenever the associated query object
is positioned past the last row. The difference is that you must
test the QUERY-OFF-END attribute for this condition at a specific
place in your application code, whereas the OFF-END event procedure
executes like a trigger whenever the event occurs.
Consider the following restrictions when using the OFF-END event
with a query on a ProDataSet temp-table buffer:
- You can attach these events only to a query on a single
ProDataSet temp-table buffer. You cannot attach these events to
a query on a database buffer, or a query that involves a join.
- The query must be a scrolling query.
- If you never RETURN NO-APPLY, from the OFF-END event handler,
the query will infinitely loop.
- Call the SET-CALLBACK-PROCEDURE( ) method before the query is
- If you use the GET LAST statement or GET-LAST( ) method to get the
last record associated with the query, the event handler is called repeatedly
until it does not RETURN NO-APPLY (indicating that all records
have been retrieved). For this reason, use caution when offering
users the GET LAST action.
- The INDEXED-REPOSITION option is ignored for the query.