Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to go backward & forward in cursor rows?
Hi,
to go forward, you just fetch the next row(s) from your statement. dunno, how to get backwards though - this seems a little problematic as you would need to store the already fetched results somewhere. (as far as i know, cursors do not support going backwards.) temporary tables in 8.1 might help.
re-running the query is probably easier to implement - but you may get different results, unless you set your transaction so span multiple selects. (set transaction read only ?, with its drawbacks)
if you have an environment with more than about 10 users, you may get into scalability issues very quickly. - tons of storage for the old results would be required, no matter how you implement this.
Karsten
In article <aIHO3.205$7n3.7454_at_dfiatx1-snr1.gtei.net>,
"John Haskins" <76054.334SPAMBEGONE_at_compuserve.com> wrote:
> Greetings:
>
> I'm writing a series of stored procedures for use by C & Java
programmers in
> my company. Now the programmers would like to be able to query a set
of
> records, have the result set stay on the server, and be able page
forward
> and back through that result set without having the query re-run
(e.g., next
> 20 records, last 20 records, etc.). I've looked through the Oracle
docs but
> haven't seen how to do this yet. Can anyone point me in the right
> direction?
>
> Thanks.
>
>
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Tue Oct 19 1999 - 05:29:24 CDT