Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Backward-scrolling cursor in Oracle

Re: Backward-scrolling cursor in Oracle

From: Andrew Protasov <protasov_at_percombank.kiev.ua>
Date: 1997/04/16
Message-ID: <AAq_96tKcU@percombank.kiev.ua>#1/1

>
> In article <AAEXS4tydR_at_percombank.kiev.ua>, protasov_at_percombank.kiev.ua
> says...
> > Hi,
> >
> > It's quite easy to save fetched data into fixed length record file.
> > You should open such a file for each opened for select cursor.
> > You can scroll backward using this file. I have made this some
> > years ago in OCI C program. The only problem is that you should
> > use select for update statement to lock fetched data or refresh
> > them before update.
> >
> > Best wishes, Andrew Protasov
> >
> > >
> > > Kingsley Idehen wrote:
> > >
> > > No, in fact you do the very right thing. It is just the Oracle 7
> > > doesn't
> > > support backward-scrolling cursor.
> > >
> > > However, I am interesting in how you implement the backward-scrolling
> > > without
> > > the database support it.
> > >
> > > You store some records in a buffer ? If so, what is your record
 limit ?
> > >
> > > Or you simply reopen the cursor and refetch from the begining ?
> > > If so, would that be slow ?
> > >
> > > Cheers,
> > > Michael
> > >
> > > > We support Scrollable Cursors across Oracle 7, have we done
 something wrong
> > > > <g>.
> > > >
> > > > > However, the Oracle RDBMS itself doesn't support backward-
 scrolling
> > > > > cursor.
> > > > > Probably the Oracle 8 will.
> > >
> >
> Instead of using files to implement backward scrolling cursors, place the
> data retrieved from the cursor into PL/SQL tables.
> --
> Frances Edelstein
> Author of "Learning Oracle Database Programming"
> Relational Business Systems
> fran_at_rbsbooks.com
> http://www.rbsbooks.com
>

My solution with files is better for front-end. You cann't easy retrieve PL/SQL table at client side. Binding to the host array has memory limitations. One can obtain PL/SQL table elements in arbitrary order using PL/SQL code in front-end but this is much more slower than file access. And your solution is good for back-end.

                                      Andrew Protasov
                                      protasov_at_percombank.kiev.ua
Received on Wed Apr 16 1997 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US