× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I may be able to give you some pseudo code, Jim. Snippets might be a bit more difficult because the code depends so much on the file structures and I'm pretty sure everything I've done is on client applications.

Joe

Joe

Any chance you have a code snippet or psuedo code on how to do what you
described in your second paragraph? It's just what I need to replace rla in
some of our order entry programs. In rla, the search argument the
users enter is really a starting point that allows them to page forward or
backward as much as they want.

Jim Horn

------------------------------

message: 4
date: Thu, 24 Feb 2011 09:19:43 -0600
from: Joe Pluta<joepluta@xxxxxxxxxxxxxxxxx>
subject: Re: READE on a file selected by user

Unfortunately, no. All a scrollable cursor does is allow you to
position within the result set, and even then only by an offset of
number of records, not by key. The problem is that if you use a
position-to field (let's say customer 1234), then your SELECT will have
"WHERE MYCUST>= 1234". The result set will then by definition only
contain records with customers .GE. 1234, and so you cannot scroll back
to, for example, customer 1000.

That's why I create two cursors, one going forward and one going
backward. When the user pages up from the initial position, I use the
backward cursor. You go back one page, find the key for that position,
then reset both cursors. Not particularly pretty, but it works.

Joe


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.