Re: Cursors and transactions

From: Lindsberger Franz <franz.lindsberger_at_siemens.at>
Date: 1997/02/03
Message-ID: <32F59A4C.45B6_at_siemens.at>#1/1


Ken Friday wrote:
>
> Andrea wrote:
> >
> > Sorry for my english,
> > Some one can help me about this PL-Sql function.
> >
> > I would like know if a write this :
> >
> > ....
> > CURSOR c_test IS
> > SELECT id, errore
> > FROM messagges;
> >
> > .....
> > INSERT INTO messages VALUES (100, 'error 1');
> > ....
> > INSERT INTO messages VALUES (101, 'error 2');
> > ...
> > << some others statments>>
> > ...
> > OPEN c_test;
> > ROLLBACK;
> > ->> here I see again my rows ? Is it possibile to a do a loop on that
> > cursor o
> > the rollback delete also in memory my rows ?
> >
> > Thanks
> >
> > --
> > Andrea
> > A.Savino_at_stm.it
> Interesting twist on Oracle read consistency....... which guarantees
> that the data will be consistent (point in time) from the time a SQL
> statement starts untill it completes (e.g. from open cursor to close
> cursor). In other words in your example you would have to close and
> re-open the cursor.
>
> Note that it's not really a memory thing the read consistent view is
> reconstructed from data and rollback.
>
> Ken F.

hello!
your thinkings about result cached in memory brought me to an idea for solving your problem:

1) use a pl/sql - procedure to code your error - handling
2) define your cursor c_test
3) define a pl/sql table of c_test%TYPE using

   "tab_test IS TABLE OF test%TYPE INDEX BY BINARY_INTEGER" 4) select all your rows from c_test INTO tab_test and close c_test finally) work up your records step by step - doing commits, rollbacks or any other things

greetings from a sunny, cold AUSTRIA Received on Mon Feb 03 1997 - 00:00:00 CET

Original text of this message