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: Scott Canaan <srcdco_at_ritvax.isc.rit.edu>
Date: Thu, 05 Oct 2000 08:52:41 -0400
Message-Id: <10640.118574@fatcity.com>


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. 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.

Schoen Volker wrote:

> 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 in 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 := to_number(telUmschlaganweisung.GesamtMenge);
> else
> r.GESAMTMENGE :=NULL;
> end if;
> exception
> when others then
> strMsg := 'Gesamtmenge nicht numerisch!';
> Rollback;
> if Fehler_protokollieren( strMsg ,tVerw, u) = false then
> RETURN FALSE;
> end if ;
> bFehlerAufgetreten := 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ön
> 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).

--
Scott Canaan (srcdco_at_rit.edu)
"Life is like a sewer, what you get out of it depends on what you put into it" -
Received on Thu Oct 05 2000 - 07:52:41 CDT

Original text of this message

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