Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: WebDB - Form contents in PL/SQL code

Re: WebDB - Form contents in PL/SQL code

From: <schipper_at_frg.eur.nl>
Date: Tue, 14 Sep 1999 12:06:57 GMT
Message-ID: <7rldor$dnh$1@nnrp1.deja.com>


In article <7rioig$fj8$1_at_nnrp1.deja.com>,   Dave Grantier <foobar_dave_at_my-deja.com> wrote: Hi Dave,

if you use a java script instead of PL/SQl than you could use the field validate option (on the column formatting and validation screen) to accomplish this. This script is executed before the data is entered in the database. There also is a form validat option.

In the advanced PL/SQL section there are two more options: before processing the form and after processing the form.

form values are stored in the l_arg_values array. See one of my previous messages about form values.

Desiree
> Yep, I'm trying the procedure route. Validating the data hasn't be
the
> tough part, though...I'm just trying to sort out how to best interface
> WebDB to my validation routines...that is, how do I tell the user (who
> is in a web browser), "You entered something that doesn't work. Go
back
> and blah blah blah."
>
> For those that are interested (and can possibly provide some tips?):
> If I want to update a form based on more than one table, the thing to
do
> is to write a procedure which updates the tables (validating data,
> checking constraints, trapping exceptions, etc.) and then build the
form
> on that procedure, rather than on one of the tables.
>
> Other comments, tips, etc. are still certainly welcome, as I am fairly
> new to this WebDB thing.
>
> Thanks again,
> Dave
>
> --
> +---------------------+---------------+
> |nojunkmail_at_nospam.com| mindspring.com|
> |nospam_at_nojunkmail.com| davegrantier@ |
> +---------------------+---------------+
>
> In article <7rhuhr$36s$1_at_platinum.sge.net>,
> "Rod Stewart" <rod.stewart_at_afp.gov.au> wrote:
> > 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
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
>

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't. Received on Tue Sep 14 1999 - 07:06:57 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US