× 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.



<Peter>
If the WHERE clause specifies the key > 'pet', are you saying that a FETCH PREVIOUS will get the record prior to the one with a key of 'pet'?

If not, then you're saying you have to expand the result set to include record prior to 'pet'. If that's true, then how do you position the SQL cursor to fetch the 'pet' record after opening the cursor?
</Peter>

... using RLA, you would have to decide at the beginning, if you wanna go upstairs or downstairs - same in SQL. If you change your decision after going some steps, you would need a second cursor (it should not be too hard to find the solution, having a look to my previous post). This might happen in some subfile programms. Leaving the preselected segment, seems alittle bit strange to me, but I've seen such progtramms?!
The SQL way for this would be to pull the data to the programm in large blocks (pulling 1000 records is nearly as fast as reading one record) - after this, you could navigate in these 1000 records in your programm, coming to the end, you would load the next block.

Going from RLA to SQL is more than translating RLA code to SQL data access. Coding RLA, you are walking up or down a data path (mostly one table!) per setxx and read*p, chainig additional data from othe tables. The SQL way would be to pull all needed data with one SQL statement, oftly with one single fetch. Using Views, you could hide the structure of your database to the application layer. In your programm, you would see select * from someView, the where clause sets some conditions (as the user wants), the order by clause would sort the data, as the user wants. The same programm could allow very diffrent conditions and sort criteria and you would get much more flexibility for your users.

D*B



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.