PDA

View Full Version : Doing Validation before Commit


Elie Constantine
11-30-2004, 06:16 AM
Hi all,

I have a form with 2 data blocks joined in a 1 to many relationship.

when the user want to save the form. a procedure will run, do some
checking and decide if everything ok on the details level.

If everything ok it will continue else it will prohibit the user from
doing save by calling FORM_TRIGGER_FAILURE.

At which level and using which trigger the FORM_TRIGGER_FAILURE must
be called.


Thanks

Daniel Morgan
11-30-2004, 08:06 AM
Elie Constantine wrote: Hi all, I have a form with 2 data blocks joined in a 1 to many relationship. when the user want to save the form. a procedure will run, do some checking and decide if everything ok on the details level. If everything ok it will continue else it will prohibit the user from doing save by calling FORM_TRIGGER_FAILURE. At which level and using which trigger the FORM_TRIGGER_FAILURE must be called. Thanks

I am so very happy for you.
--
Daniel A. Morgan
University of Washington
damorgan@x.washington.edu
(replace 'x' with 'u' to respond)

Elie Constantine
12-01-2004, 03:42 AM
That didn't solve my problem

Thanks anyway for trying to help

DA Morgan <damorgan@x.washington.edu> wrote in message news:<1101830675.193129@yasure>... Elie Constantine wrote: Hi all, I have a form with 2 data blocks joined in a 1 to many relationship. when the user want to save the form. a procedure will run, do some checking and decide if everything ok on the details level. If everything ok it will continue else it will prohibit the user from doing save by calling FORM_TRIGGER_FAILURE. At which level and using which trigger the FORM_TRIGGER_FAILURE must be called. Thanks I am so very happy for you.

Vignesh Srinivasan via OracleMonster.com
12-01-2004, 09:45 AM
We require highly experienced Oracle Database Administrators with extensive knowledge in programming Oracle working on either versions 8 or Oracle 9i. Tasks consist of programming and writing specification scripts on PL/SQL, planning, documentation, from Conception, including optimization and selection of software tools. The ideal candidates selected will be working in a senior capacity with scope of moving into management.

Locations: Prague and Germany.

Please forward your applications to: Gina Gates at Gina.gates@p-45.com, or if you have a friend or colleague who you believe will be suited to these positions please ask them to forward their resume ASAP to have an interview arranged

--
Message posted via http://www.oraclemonster.com

Daniel Morgan
12-01-2004, 05:04 PM
Elie Constantine wrote: That didn't solve my problem Thanks anyway for trying to help DA Morgan <damorgan@x.washington.edu> wrote in message news:<1101830675.193129@yasure>...Elie Constantine wrote:Hi all,I have a form with 2 data blocks joined in a 1 to many relationship.when the user want to save the form. a procedure will run, do somechecking and decide if everything ok on the details level.If everything ok it will continue else it will prohibit the user fromdoing save by calling FORM_TRIGGER_FAILURE.At which level and using which trigger the FORM_TRIGGER_FAILURE mustbe called.ThanksI am so very happy for you.

It wasn't intended to solve your problem. It was intended to
convey the fact that you didn't provide enough information
from which a response could be formulated.

The obvious point to raise an error is in the procedure. So
why you are asking questions about triggers is not clear.
--
Daniel A. Morgan
University of Washington
damorgan@x.washington.edu
(replace 'x' with 'u' to respond)

Elie Constantine
12-02-2004, 04:36 AM
Ok... Sorry for any inconveniences.

The FORM_TRIGGER_FAILURE call will be in the procedure.
But from which trigger I should make a call to this procedure. In the
POST-FORM, KEY-COMMIT, ON-COMMIT.....????? This procedure can also be
written to post the details data block, do the check then in case some
rules were not met raise the error and prohibit the data in both master
and detail blocks from been committed.


Regards,
Elie,

Daniel Morgan
12-02-2004, 06:35 AM
elie.constantine@gmail.com wrote: Ok... Sorry for any inconveniences. The FORM_TRIGGER_FAILURE call will be in the procedure. But from which trigger I should make a call to this procedure. In the POST-FORM, KEY-COMMIT, ON-COMMIT.....????? This procedure can also be written to post the details data block, do the check then in case some rules were not met raise the error and prohibit the data in both master and detail blocks from been committed. Regards, Elie,

No ... it is a procedure not a trigger. Write:

BEGIN
.. your code here
EXCEPTION
WHEN <some_condition> THEN
.. whatever you wish
END;

--
Daniel A. Morgan
University of Washington
damorgan@x.washington.edu
(replace 'x' with 'u' to respond)

Elie Constantine
12-04-2004, 04:03 AM
Great!

so let's suppose I put this code in a procedure called
Test_Before_Save

BEGIN
.. your code here
EXCEPTION
WHEN <some_condition> THEN
.. whatever you wish
END;


Now where can I call the Test_Before_Save procedure from?

Should I do it from the KEY-COMMIT trigger on the form level or from
the KEY-COMMIT trigger on the detail datablock level or from the
master datablock level.

Or should I call it from another trigger like POST-FORM...

Regards,

Elie,



DA Morgan <damorgan@x.washington.edu> wrote in message news:<1101998063.564651@yasure>... elie.constantine@gmail.com wrote: Ok... Sorry for any inconveniences. The FORM_TRIGGER_FAILURE call will be in the procedure. But from which trigger I should make a call to this procedure. In the POST-FORM, KEY-COMMIT, ON-COMMIT.....????? This procedure can also be written to post the details data block, do the check then in case some rules were not met raise the error and prohibit the data in both master and detail blocks from been committed. Regards, Elie, No ... it is a procedure not a trigger. Write: BEGIN .. your code here EXCEPTION WHEN <some_condition> THEN .. whatever you wish END;


MyLounge.com Site Map
Forum: Cars, Cell Phone, Database, Games, Home Improvement, IT, Music, School, Sports, Web Design, Web Server, Weight Loss

The MyLounge.com forum is intended for informational use only and should not be relied upon and is not a substitute for any advice. The information contained on MyLounge.com are opinions and suggestions of members and is not a representation of the opinions of MyLounge.com. MyLounge.com does not warrant or vouch for the accuracy, completeness or usefulness of any postings or the qualifications of any person responding. Please consult a expert or seek the services of an attorney in your area for more accuracy on your specific situation. Please note that our forums also serve as mirrors to Usenet newsgroups. Many posts you see on our forums are made by newsgroup users who may not be members of MyLounge.com Term of Service