Re: oracle 8i database trigger - showing error message on a visual basic form

From: Mladen Gogala <gogala.mladen_at_gmail.com>
Date: Fri, 28 Apr 2017 16:50:06 -0000 (UTC)
Message-ID: <odvrru$2em$4_at_dont-email.me>


On Thu, 27 Apr 2017 02:55:56 -0700, yemmap16 wrote:

+AD4 On Wednesday, 16 May 2001 02:15:14 UTC+-7, Jeanette Weldon wrote:
+AD4APg what I need to do is show an error message on a visual basic form and
+AD4APg force the user to enter a specific field if it is null in certain cases
+AD4APg when the user commits the record. I cannot make the column mandatory
+AD4APg as it must only be populated in certain cases. The user is using a
+AD4APg visual basic form on an oracle 8i database. I do not have access to
+AD4APg the visual basic form source code so I thought I'd try and write an
+AD4APg oracle database trigger.
+AD4APg
+AD4APg below is my database trigger but I get a run-time error against the
+AD4APg RAISE+AF8-APPLICATION+AF8-ERROR line.
+AD4APg
+AD4APg CREATE OR REPLACE TRIGGER sdc+AF8-moa+AF8-db+AF8-trigger BEFORE INSERT OR UPDATE
+AD4APg OF ae+AF8-mode+AF8-of attendance ON application+AF8-events FOR EACH ROW WHEN
+AD4APg (new.ae+AF8-mode+AF8-of+AF8-attendance
+AD4APg IS NULL AND new.ae+AF8-evt+AF8-ref+AF8-no
+AD4APg +ACEAPQ '100')
+AD4APg BEGIN
+AD4APg RAISE+AF8-APPLICATION+AF8-ERROR(-20000,+ADw-message+AD4)+ADs
+AD4APg END+ADs
+AD4APg
+AD4APg Jeanette

This sounds like something that should be done in the application, not the database.

-- 
Mladen Gogala
The Oracle Whisperer
http://mgogala.byethost5.com
Received on Fri Apr 28 2017 - 18:50:06 CEST

Original text of this message