newbie needs error handling help

From: <mitch23_at_hotmail.com>
Date: Mon, 06 Dec 1999 17:32:45 GMT
Message-ID: <82grvl$l8o$1_at_nnrp1.deja.com>



[Quoted] I am trying to debug the attached function. When I run it, I get an ORA-06512 error. I'd like to find out what the value of the cursor is when this error occurs, so I added an EXCEPTION handler to trap the error and then display the contents of the cursor at that point (to assist me in debugging the error)

Anyway, when I try to create the function, it is created with "compilation errors". I'm assuming this is due to the error handling code
I added, since the function was created without errors before I added it.



[Quoted] CREATE OR REPLACE FUNCTION CONCAT_PROBLOGUPD(P_NUMBERPRGN IN VARCHAR2) RETURN VARCHAR2
AS

   CURSOR C_STR(IN_NUMBERPRGN IN VARCHAR2) IS    SELECT UPDATE_ACTION LOGUPD FROM HFS_PROBLEM_UPDATEACTION    WHERE NUMBERPRGN = IN_NUMBERPRGN ORDER BY RECORD_NUMBER;
--

   STR_REC C_STR%ROWTYPE;

      TEMP RAW(2000):=NULL;
	RCNT NUMBER := 0;

BEGIN
   DECLARE numeric_error EXCEPTION;
   PRAGMA EXCEPTION_INIT(numeric_error, -6512);    OPEN C_STR(P_NUMBERPRGN);
LOOP
      FETCH C_STR INTO STR_REC;
      EXIT WHEN C_STR%NOTFOUND;
	    TEMP := TEMP||STR_REC.LOGUPD;

END LOOP;
--

   RETURN TEMP;
EXCEPTION
<----need code here to display cursor contents END;
/



[Quoted] Thanks for any help.

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Mon Dec 06 1999 - 18:32:45 CET

Original text of this message