[Forms 3.0] How do you capture an ORACLE error code?
From: Youichi Tamura <y-tamura_at_nri.co.jp>
Date: Thu, 19 May 1994 02:38:19 GMT
Message-ID: <Cq13Bw.8AD_at_nrigw11.nri.co.jp>
Date: Thu, 19 May 1994 02:38:19 GMT
Message-ID: <Cq13Bw.8AD_at_nrigw11.nri.co.jp>
Please help me solve my problems with error handling in SQL*Forms 3.0. (Server here is 7.0.15) 1. DISPLAY_ERROR This packaged procedure returns to the screen specific information about, for example, FRM-40508. It comes in useful when you want to know specifically why Forms couldn't perform the DML operation. The problem is, when you have a very long DML statement in error, it pushed the error code portion out of the page (and there's no scroll facility). Is there any way to get the error code at all? 2. PRAGMA EXCEPTION_INIT When you know in advance what ORACLE error code to expect, you can declare your own exception and handle it via PRAGMA EXCEPTION_ INIT. The trouble I'm having is, when you declare it in a trigger and an error occurs in a packaged procedure that is called by that trigger, I can't handle it, as the packaged procedure seems to raise some exception within itself. The code looks something like this: declare foreign_key_violation EXCEPTION; PRAGMI EXCEPTION_INIT(foreign_key_violation, -2291); beginReceived on Thu May 19 1994 - 04:38:19 CEST
....
COMMIT_FORM;
....
EXCEPTION WHEN foreign_key_violation THEN MESSAGE ('No corresponding parent record.'); END; When COMMIT_FORM does not succeed due to ORACLE error 2291, it simply returns FRM-40508. The user would not have a clue as to what the ORACLE error was. This does look logical, but I need some workaround. Please help. I will greatly appreciate an e-mail reply, as the news feed here is 7-10 days behind. Thank you. Yoichi Tamura y-tamura_at_nri.co.jp