Re: fetching rows from a certain point after closing cursor
From: John Verhoeven <johnv_at_acix.DIALix.oz.au>
Date: 1996/09/08
Message-ID: <johnv.0a0c_at_acix.DIALix.oz.au>#1/1
Date: 1996/09/08
Message-ID: <johnv.0a0c_at_acix.DIALix.oz.au>#1/1
In article dated Sat, 07 Sep 1996 14:56:52 -0400, Ashley Coutinho (ashley_at_ibmail.smst290.att.com) wrote:
> I developing an interface to our database over the WWW.
>
> Problem:
> User conducts a query.
> Declare cursor
> Query matches 100 records but I fetch 20 only.
> Close cursor
> Program exits
>
> User asks for the next 20.
> ?????? How do I start from the previous point
> without querying the old 20 records ????????
I assume each row has a unique key.
- Return the rows in order of the unique key.
- Remember the key of the last row returned
- When user wants next 20 rows
- select .... where key > last_key_value
Hows that?
-- _--_|\ John Verhoeven Unix / Database Administrator Westrail / \ johnv_at_DIALix.oz.au / jverhoeven_at_westrail.wa.gov.au *_.--._/ v "Smile! things could be worse... So I did... and they were..."Received on Sun Sep 08 1996 - 00:00:00 CEST