Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

Embedded SQL and Dynamic Sorting Subfiles

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Embedded SQL and Dynamic Sorting Subfiles

    ** This thread discusses the article: Embedded SQL and Dynamic Sorting Subfiles **
    ** This thread discusses the Content article: Embedded SQL and Dynamic Sorting Subfiles0

  • #2
    Embedded SQL and Dynamic Sorting Subfiles

    ** This thread discusses the article: Embedded SQL and Dynamic Sorting Subfiles **
    Hi Kevin I have been given a project that requires the need to display, within a subfile, the data from 2 seperate files with the ability to sort the data from a number of different columns. So I thought to myself, this smacks of embedded SQL and Dynamic Sorting Subfiles, but wait, that title is somewhat familiar. With a rising of hope and confidence, I searched for your article, which I had read some time ago. The unfourtunate thing is that the data I have to display is over 15,000 records long (and growing) so I am looking for an example of "Embedded SQL and Dynamic Sorting Subfiles - Page at a time (with the ability to position to a particular piece of data)" Some title for an article huh? If you have an example of what is required, or could point me in some direction, I would be very grateful. Thanks in advance Alan Shore

    Comment


    • #3
      Embedded SQL and Dynamic Sorting Subfiles

      ** This thread discusses the article: Embedded SQL and Dynamic Sorting Subfiles **
      Alan, You aren't the only one with the issue. I am looking at the exact same requirements....and 6+ months later, I still can't find a simple solution. I suspect the answer lies in programmatically saving the before/after keys and recreating the SQL command for each page load. But, if this is the answer, how efficient can that be? Any help by anyone would be appreciated. Paul Thieme

      Comment


      • #4
        Embedded SQL and Dynamic Sorting Subfiles

        ** This thread discusses the article: Embedded SQL and Dynamic Sorting Subfiles **
        Actually, you can do this by Open SCROLL CURSOR (with ORDER BY you want) in SQLRPGLE and use FETCH RELATIVE when user press Page-Up Button / use FETCH NEXT when user press Page-Down Button. If user press some key (F9, F14, etc...) to sort data based on the column they want, you just simply close the old CURSOR and reopen it again with new ORDER BY that you choose.

        Comment


        • #5
          Embedded SQL and Dynamic Sorting Subfiles

          ** This thread discusses the article: Embedded SQL and Dynamic Sorting Subfiles **
          I investigated using Dynamic SQL for different sorts of data onto a subfile, and you are right. By using FETCH RELATIVE, you are able to 'page-up' and 'page-down' very effectively. The problem I was having was due to the fact that the sub-file that I had to produce was a page-at-a-time sub-file. This entailed giving the user the option of positioning to a certain point, and then filling the sub-file data from that point. That by itself is not the problem, neither is page-down, but how do you page-up from that point? Alan

          Comment


          • #6
            Embedded SQL and Dynamic Sorting Subfiles

            ** This thread discusses the article: Embedded SQL and Dynamic Sorting Subfiles **
            Try using FETCH PRIOR to page up. This works like READP. Scott

            Comment

            Working...
            X