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: ORA-01002 Fetch out of sequence

Re: ORA-01002 Fetch out of sequence

From: Mark Gumbs <mgumbs--AT--hotmail.com>
Date: Thu, 6 May 1999 13:52:55 +0100
Message-ID: <37318ea1.0@145.227.194.253>


I can't see all your code. However, i'll assume you have this snippet in some kind of loop and are trying to perform a commit after each iteration of the loop.
If you are using the 'for update' clause, commits are not allowed and hence will mess up the fetching sequence.

I don't know how you can do it in delphi but in PL/SQL you can do something like this. (the ?? are some kind of arbitary value). This way, a commit can be issued.

declare

cursor c1 (v_clientref in varchar2) is
 select * from client
 'where client_reference=v_ClientRef;

begin

for data in c1(???client_reference??) loop

    update client
    set ???? = ????
    where client_reference = data.client_reference;

   commit;
end loop;

end;

HTH, Mark


Colin Basterfield wrote in message
<925922139.15688.0.nnrp-12.c1ed1510_at_news.demon.co.uk>...
>Hello all,
>
> I am doing a simple
>
>'select * from client'
>'where client_reference=:ClientRef'
>'for update nowait'
>
>This is using Delphi 4. It gives me the message
>
>'ORA-01002 Fetch out of Sequence'
>
>Anyone got any ideas on this one please?
>
>TIA
>Colin Basterfield
>colinb_at_areagem.demon.co.uk
>
>
Received on Thu May 06 1999 - 07:52:55 CDT

Original text of this message

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