Re: fetching rows from a certain point after closing cursor
Date: 1996/09/08
Message-ID: <50uulf$dj_at_client2.news.psi.net>#1/1
In article <3231C574.24AC_at_ibmail.smst290.att.com>,
Ashley Coutinho <ashley_at_ibmail.smst290.att.com> wrote:
>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 ????????
this is a common problem in designing GUI with oracle. usual solution, as implemented by oracle in their GUI tools:
- open cursor
- fetch first/next N rows
- <user asks for next N>
- write current N to file or memory
- goto 2
- <user asks for previous N rows>
- write current N to file or memory
- read prior N from file or memory
- wait for 3. or 6. 10.<user signifies he's done>
- post changes and commit
- optionally close cursor
it seems silly to keep your own result set but: a. oracle doesn't permit non-sequential access to its result set; b. your changes are usually made just to your GUI widgets; generally
we post and commit changes in bulk rather than as the user mouses around. so you must store the current state of the widgets until commit.
-- Dave Mausner, Consulting Manager, Braun Technology Group, Chicago.Received on Sun Sep 08 1996 - 00:00:00 CEST