"RPG400-L" <rpg400-l-bounces@xxxxxxxxxxxx> wrote on 08/09/2016 10:26:12
AM:
For me, I find it better to use an expanding subfile, and do repeated
reads
to manually find the value if a position-to is required. This way, a
scrollable cursor is not needed. I have one application with a
scrollable
cursor, and I didn't find a lot of advantage to it.
An expanding subfile is good up to 9,999 rows (the limit of a
subfile). Some would say that if the user wants to scroll beyond that
then they should be forced to put in a key value from which to re-start.
But, imagine the performance drain if you had to programmatically search a
9,999 row subfile only to find that the requested key value is not in the
subfile and you then have to open a new cursor anyway? Now, it is
possible to do a binary search of the subfile and alleviate that problem.
;-)
That said, the use I find for a scrollable cursor is if you decide
that your subfile is never more than one page in size and a position-to
request is always satisfied by closing and reopening the cursor starting
at the new position.
Sincerely,
Dave Clark
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact
[javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.