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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: ORA-1002, Fetch out of sequence

Re: ORA-1002, Fetch out of sequence

From: Rajagopal Venkataramany <rajagopalvr_at_excite.com>
Date: Thu, 5 Oct 2000 21:20:53 -0700 (PDT)
Message-Id: <10640.118662@fatcity.com>


Hi,

  Sorry to say that this is not TRUE.

  In a Cursor loop, after a commit is issued, it releases the locked   rows (if any). You can still remain in the loop to process other   rows...

  Can Schoen Volker post the entire source of the stored procedure   so that I can give u a solution for this... Again, let it be in=20   english.. I am having difficulty trying to understand from the   existing code as to what u are trying to do...

Regards
Rajagopal Venkataramany

On Thu, 05 Oct 2000 05:56:11 -0800, ORACLE-L_at_fatcity.com wrote:

> Schoen,
> You can't do another fetch from the cursor once a commit or rollback
has
> been issued. Both commands will automatically close all open cursors.=
=20
That is
> why you are getting the ORA-01002: Fetch out of sequence. The cursor is
no
> longer open, therefore there are no more rows to be returned.

> =20

> Schoen Volker wrote:
> =20

> > Hi list,
> >
> > I've a problem with a procedure. In the procedure I open a cursor and
make
> > fetches from a table in a loop. When I get a error I make a rollback i=
n
this
> > loop and want to fetch the next row. After the rollback I get ora-1002=
:
> > Fetch out of sequence. I don't use SELECT FOR UPDATE.
> >
> > here the part with the rollback:
> >
> > begin
> > if rtrim(telUmschlaganweisung.Gesamtmenge) is not null then
> > r.GESAMTMENGE :=3D=20

to_number(telUmschlaganweisung.GesamtMenge);
> > else
> > r.GESAMTMENGE :=3DNULL;
> > end if;
> > exception
> > when others then
> > strMsg :=3D 'Gesamtmenge nicht numerisch!';
> > Rollback;
> > if Fehler_protokollieren( strMsg ,tVerw, u) =3D fal=
se
then
> > RETURN FALSE;
> > end if ;
> > bFehlerAufgetreten :=3D true;
> > Commit;
> > end;
> >
> > If everything is OK and the procedure makes a COMMIT teh procedure
produces
> > no errors.
> >
> > Here my environment:
> > Oracle 7.3.4.5.0 Windows NT 4.0 SP5
> >
> > TIA
> >
> > Regards
> >
> > Volker Sch=F6n
> > E-Mail: mailto:v.schoen_at_inplan.de
> > http://www.inplan.de
> >
> > --
> > Please see the official ORACLE-L FAQ: http://www.orafaq.com
> > --
> > Author: Schoen Volker
> > INET: v.schoen_at_inplan.de
> >
> > Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> > San Diego, California -- Public Internet access / Mailing Lists
> > --------------------------------------------------------------------
> > To REMOVE yourself from this mailing list, send an E-Mail message
> > to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> > the message BODY, include a line containing: UNSUB ORACLE-L
> > (or the name of mailing list you want to be removed from). You may
> > also send the HELP command for other information (like subscribing).
> =20

> --
> Scott Canaan (srcdco_at_rit.edu)
> "Life is like a sewer, what you get out of it depends on what you put
into it" -
> Tom Lehrer
> =20
> =20

> --=20
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --=20
> Author: Scott Canaan
> INET: srcdco_at_ritvax.isc.rit.edu
> =20

> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).

Regards
Rajagopal Venkataramany


Received on Thu Oct 05 2000 - 23:20:53 CDT

Original text of this message

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