Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Error using Cursor ..Fetch
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;
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