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



Ok, how's this for a stab-in-the-dark....

--- first snip ---

  %ELIF (submit == "Next")
    %{ --- Next page selected. Check to see if we run off the end. If we
            do, then there is no last or next.
    %}
    @DTW_ADD(START_ROW_NUM, RPT_MAX_ROWS, START_ROW_NUM)
    %IF (@DTW_rADD(START_ROW_NUM, RPT_MAX_ROWS) > totalRows)
      @DTW_ASSIGN(includeLast, "NO")
      @DTW_ASSIGN(includeNext, "NO")
    %ENDIF

--- end of paging button action ---

Pay attention to the START_ROW_NUM variable, if I remember correctly, I had
to hide this variable during some miscellaneous IO operations and make sure
it's sent out to the page in a hidden field so that it get's passed back
into the macro when the paging option is selected.




I do recall having some kind of problem with the sample code not working
correctly, but that was more than a year ago. I do have that type of code
working, but it is one of my larger macros and I don't know if posting it
all here would be of benefit or how many people want to read 600+ lines of
net.data not to mention, that it's full of site specific crap.


===========================================================
R. Bruce Hoffman, Jr.
 -- IBM Certified Specialist - iSeries Administrator
 -- IBM Certified Specialist - RPG IV Developer

"There is a crack in everything,
  that's how the light gets in.
    - Leonard Cohen

----- Original Message -----
From: "Peter Dow" <maillist@dowsoftware.com>
To: <WEB400@midrange.com>
Sent: Monday, August 19, 2002 7:46 PM
Subject: [WEB400] Net.data START_ROW_NUM with SELECT WHERE clause


> I'm trying to implement PREVIOUS|NEXT processing for search results when
> particular selection criteria return a large result set.  I used the
example
> in the "Net.Data Reference" manual under START_ROW_NUM; pretty much the
only
> difference is the SELECT (I use a WHERE and an ORDER BY) and how I format
> the results.  The code for handling the PREVIOUS|NEXT processing was
> copied/pasted.
>
> The results are limited to RPT_MAX_ROWS as expected, and the NEXT href is
> formed correctly, however, when clicked, the result is not the next set of
> records, but the 1st set.
>
> Any ideas what I'm doing wrong?  I'm on V4R5 using the classic HTTP
server.
> I can post code if that would help find the problem.
>
> tia,
> Peter Dow
> Dow Software Services, Inc.
> 909 793-9050 voice
> 909 522-3214 cellular
> 909 793-4480 fax
>
>
>
> _______________________________________________
> This is the Web Enabling the AS400 / iSeries (WEB400) mailing list
> To post a message email: WEB400@midrange.com
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/cgi-bin/listinfo/web400
> or email: WEB400-request@midrange.com
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/web400.
>



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.