Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: WebDB - Form contents in PL/SQL code
If I understand your question correctly, there are probably a couple of ways
to do this. The first would be to use a trigger that fires on insert into a
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
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 from there. Another similar way is to control any inserts/updates by using a function or procedure. This is basically the same thing except that you are calling the program explicity.
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 Sun Sep 12 1999 - 23:24:54 CDT
![]() |
![]() |