Re: WebDB - Form contents in PL/SQL code

From: Dave Grantier <foobar_dave_at_my-deja.com>
Date: Mon, 13 Sep 1999 11:52:51 GMT
Message-ID: <7rioig$fj8$1_at_nnrp1.deja.com>


[Quoted] Yep, I'm trying the procedure route. Validating the data hasn't be the [Quoted] 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 [Quoted] 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 [Quoted] is to write a procedure which updates the tables (validating data, checking constraints, trapping exceptions, etc.) and then build the form [Quoted] 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.
Received on Mon Sep 13 1999 - 13:52:51 CEST

Original text of this message