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 -> Error using Cursor ..Fetch

Error using Cursor ..Fetch

From: cschang <cschang_at_maxinter.net>
Date: Fri, 20 Aug 2004 10:58:33 -0400
Message-ID: <41261199.50000@maxinter.net>


I use a cursor to query a single record in a procedure. At the OPEN Cursor part
...

OPEN v_cursor FOR v_sqlStmt; <-- v_sqlStmt is the select statement

   LOOP

       FETCH v_cursor
       INTO p_poID(v_count), p_poLine(v_count),  p_userID(v_count), 
p_errorMsg(v_count), p_waybill(v_count), p_packinglist(v_count);
       EXIT WHEN v_cursor%NOTFOUND;
       IF  p_errorMsg(v_count) IS NOT NULL THEN
          v_poInfo:= getPOInfo(p_poID(v_count), p_poLine(v_count), 
p_condStr);
          p_errorMsg(v_count):= p_errorMsg(v_count) || '<br>' || v_poInfo;
       END IF;
       v_count:= v_count + 1;

   END LOOP;
..

if I put the section:

   IF  p_errorMsg(v_count) IS NOT NULL THEN
       v_poInfo:= getPOInfo(p_poID(v_count), p_poLine(v_count), p_condStr);
       p_errorMsg(v_count):= p_errorMsg(v_count) || '<br>' || v_poInfo;
   END IF; before the "EXIT WHEN v_cursor%NOTFOUND;" I will get a data not found error at run time for p_errorMsg(v_count), can any one tell me why? The spec of the p_errorMsg(v_count) is an IN OUT type. My system is 8.1.7 on NT 4. Thanks.

C Chang Received on Fri Aug 20 2004 - 09:58:33 CDT

Original text of this message

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