Re: Retrying a fetch after an error, without restarting the whole loop?



On Wed, 8 Nov 2006 23:26:02 -0800, Jonathan Leffler wrote:

And 2), in a fetch loop, is it possible to adjust a property like
{ReadLongLen}, and retry the same fetch without restarting the whole
loop? Because this error typically happened several minutes into the
loop.


Highly unlikely. The data has been fetched - and truncated. There's not
usually a way to refetch the same row - unless you have a scroll cursor, and
DBI doesn't have support for those.

I can see that. Well I'm thinking of the following solution next:
retrieve extra data to identify the row that went wrong and collect
them, keep going on with the rest of the records, and individually fetch
the previously failed ones afterwards.

After a failure, I can go on with the next records, can't I? And
changing ReadLongLen, is that acceptable for the remainder of the loop?

--
Bart.
.



Relevant Pages

  • Re: Self Joins and optimization
    ... What I'm interested in exploring is your assertion of the ... non-existence of a set oriented solution to the problem, ... while x.ArrivalTime is null and x%FOUND loop ...
    (comp.databases.theory)
  • Re: Bulk Collect without LIMIT
    ... Oracle, with 10g, merged the BULK COLLECT and FETCH to use the same mechanism. ... If you just say OPEN CURSOR ... ... for i in 1..500 loop ...
    (comp.databases.oracle.misc)
  • Re: Ada DB bindings and APQ
    ... > supported on sequential connections, because it is not known if all ... > tuples have been fetched until you try to fetch the next one past the ... > condition for a loop. ... Fetch would raise an exception (it cannot be ...
    (comp.lang.ada)
  • Re: Calling a SP inside a cursor loop..
    ... every loop iteration of the cursor. ... Fetch next From EffectiveDate_Cursor Into @FLD1,@FLD2 ... and If the Fetch stmt is below the begin Stmt, the loop iterations are ... the proper way to program a cursor loop is: ...
    (comp.databases.ms-sqlserver)
  • Re: -1555-ORA-01555: snapshot too old: rollback segment number 7 with name "_SYSSMU7$" t
    ... it happen to fetch something from a big result set in a loop and commit ... Or does it happen that the query runs longer than ... Well, if this script receives ORA-1555 on regular basis, then you ...
    (comp.databases.oracle.server)