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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Problem with "for update"

Re: Problem with "for update"

From: Mark C. Stock <mcstockX_at_Xenquery>
Date: Mon, 29 May 2006 14:12:34 -0400
Message-ID: <b86dnZPwuPUJpObZnZ2dnUVZ_tCdnZ2d@comcast.com>

<mxmarklein_at_gmail.com> wrote in message news:1148925166.836769.14820_at_i39g2000cwa.googlegroups.com...
: Hi,
:
: I`m trying to upload a gif-File to a database (Oracle 10g/jdbc) ...
: the interMedia Classes tutorial explains how to do this, so i attended
: it`s orders.
:
: My Problem : every time I want to select a row for the image
:
: select Front_Tex from surf_geom where id = 31388 for update
:
: there is an Exception thrown
:
: ORA-01002: FETCH out of sequence.
:
: without the "for update" part this line is processed but for later
: image upload I have to block access, otherwise there will be an
: exception.
:
: Can anybody tell me anything about the problem? and how I make the
: Database answer the select query
:
: Thanks in advance
:
: Mx
:

a little googling will get you:

      ORA-01002: fetch out of sequence
      Cause: In a host language program, a FETCH call was issued out of 
sequence. A successful parse-and-execute call must be issued before a fetch. This can occur if an attempt was made to FETCH from an active set after all records have been fetched. This may be caused by fetching from a SELECT FOR UPDATE cursor after a commit. A PL/SQL cursor loop implicitly does fetches and may also cause this error.

      Action: Parse and execute a SQL statement before attempting to fetch the data.

if this doesn't help you zero in on the error, post the rest of you code and you'll probably get some help on exactly what is causing the problem in your case.

++ mcs Received on Mon May 29 2006 - 13:12:34 CDT

Original text of this message

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