Re: WebDB - Form contents in PL/SQL code
Date: Mon, 13 Sep 1999 14:24:54 +1000
Message-ID: <7rhuhr$36s$1_at_platinum.sge.net>
[Quoted] If I understand your question correctly, there are probably a couple of ways [Quoted] to do this. The first would be to use a trigger that fires on insert into a [Quoted] table, looking something like this:
CREATE OR REPLACE TRIGGER before_blah
BEFORE INSERT OR UPDATE
ON Blah
REFERENCING OLD AS OLD NEW AS NEW
FOR EACH ROW
begin
[Quoted] if :new.blah_id = .... then
end if;
Exception
when ... then
end;
end;
and so on. Raise an exception if the data doesn't validate and continue [Quoted] from there. Another similar way is to control any inserts/updates by using [Quoted] a function or procedure. This is basically the same thing except that you [Quoted] are calling the program explicity.
[Quoted] create or repalce procedure insert_blah (pBlah_ID IN number) is
begin
if pBlah_ID = whatever then
insert into blah(id) values(whatever); else
raise blah_exception;
end if;
end;
/
or something like that.
HTH Rod J. Stewart
Dave Grantier <dave_at_foobar.com> wrote in message
news:37dc39a1.1406084182_at_news.mindspring.com...
> All,
> I'm using WebDB for our Company's Intranet web site. I'm trying to
> pull some form level input into PL/SQL for some validation after teh
> user submits but before updating the database. How can I
> trap/edit/evaluate user responses in PL/SQL before updating, etc. the
> database? The manuals don't really address how to do it.
> Thanks in advance,
>
> Dave
>
> +---------------------+---------------+
> |nojunkmail_at_nospam.com| mindspring.com|
> |nospam_at_nojunkmail.com| davegrantier@ |
> +---------------------+---------------+
Received on Mon Sep 13 1999 - 06:24:54 CEST