To elaborate a little more on what Philip just said (I was about to say
the same thing):
<CFPARAM lownum = 0>
<CFPARAM highnum = 20>
<CFQUERY>
select top 20 * from mytable
where mytableID > #lownum# and mytableID < #highnum#
</CFQUERY>
<FORM blahblahblah>
<INPUT type="hidden" name="lownum" value=lownum+20>
<INPUT type="hidden" name="highnum" value=highnum+20>
</FORM>
(That's the general idea anyway)
At 08:50 AM 03/10/2001 -0800, you wrote:
>Hi!
>
>I've got a simple guestbook application that holds 250 guestbooks so far.
>Some of the guestbooks are have up to 13000 records.
>
>I am returning the entire recordset and looping through it 20 records at a
>time (I didn't think that it would get to be so big), but the query times
>out on 13000 records. The database (Sybase) is optimized like butter and I
>can hit it from 20 clients at the same time with no response problems. I
>would like to stay away from cursors, because the can get messy.
>
>I have already tried caching the query (which doesn't really help because
>there are always new records begin added) and converting it to a session
>variable (which doesn't help because it just eats the ram on the boxes), so
>I need to rewrite.
>
>Does any one have any suggestions or know if there is a custom tag out
>there that increments the number of records returned as you step through
>the result set? I have checked Allaires repository, but no luck :)
>
>If not, I will write one and share it with the group if anyone is interested.
>
>-- Avrom
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists