Forward and backward scrolling
- Last Updated: March 30, 2020
- 1 minute read
- OpenEdge
- Version 12.2
- Documentation
Forward and backward scrolling
A query is scrolling if you specify SCROLLING in
the DEFINE QUERY statement or
if you define a browse for the query. You can use the REPOSITION statement
to change your current position with the result set. For a non-scrolling
query, the DataServer allows you to only move sequentially forward
through the rows by using the FIRST and options
of the GET statement. Scrolling basically means
that the result set is cached on the client for backward and forward
scrolling.
With the DataServer, forward and backward scrolling works with
a MS SQL Server just as it does with an OpenEdge database except when
the data source fails to find a record. In ABL, the cursor position
can change after a failed search; however, with the DataServer,
a failed search does not affect the cursor. For example, if a cursor
is positioned at custnum 50 and
a request for the next customer from an OpenEdge table
fails, the cursor moves to the next sequential record beyond custnum 50.
The same failed request from a data source leaves the cursor at custnum 50.
Your DataServer applications should not assume a certain cursor
position after a failed find.
You can, however, still use the AVAILABLE function to
determine whether a record is available. The AVAILABLE function
behaves consistently whether it accesses an OpenEdge database
or a MS SQL Server data source.