Re: Capturing Exceptions in Forms 4.0

From: Steve Cosner <stevec_at_zimmer.csufresno.edu>
Date: 1998/03/23
Message-ID: <6f4su1$alk_at_info.csufresno.edu>#1/1


Frm-40401 and all other FRM errors are not SQL errors from the server, so writing an exception statement won't catch it. Instead, you can trap the message in an on-error form-level trigger.

Also, if you just want to prevent it from displaying, you can set [Quoted] :system.message_level to 5 just before the commit_form, then back to 0 immediately after. But this will cause the 40400 message to disappear as well.

HTH,
Steve Cosner



http://members.aol.com/stevec5088
Downloadable utility form -- Display and update any table.

In article <351487A8.41C67EA6_at_ugrad.cs.ualberta.ca>, Dr Fgets <amcnaugh_at_ugrad.cs.ualberta.ca> wrote:
>Hi, I'm trying to capture the "No changes to commit" exception that pops
>up on me, and I can't seem to do it. I've tried this:
>NO_COMMIT EXCEPTION;
>PRAGMA Exception_Init (NO_COMMIT, -40401);
>EXCEPTION
>WHEN NO_COMMIT THEN
>message('blah blah');
>RAISE form_trigger_failure;
>and also WHEN OTHERS and what not, and it doesn't seem to work, can
>someone help me out please?
>-The illustrious DR Fgets
Received on Mon Mar 23 1998 - 00:00:00 CET

Original text of this message