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: Can anybody explain me on this

Re: Can anybody explain me on this

From: <internetual_at_my-dejanews.com>
Date: Thu, 22 Oct 1998 04:11:41 GMT
Message-ID: <70mb9t$qkm$1@nnrp1.dejanews.com>


Hi Alan,
Thanks for your respond.

But I stiil need to ask a question.Hope you don't mind.

I have created a trigger.This is the specification: (This is for my testing purpose only)

CREATE OR REPLACE TRIGGER TESTING
BEFORE INSERT ON INV.MTL_SYSTEM_ITEMS
DECLARE
BEGIN
INSERT INTO TI.DUMMY(VAL)
VALUES(99);
END; This is what I did.


  1. At first the DUMMY table doesn't have any data.

SQL> select * from dummy;

no rows selected

2)Then I run my Oracle Application (Oracle Manufacturing) - Under Define Item.   In that form screen (define item), I create a new item and save the record (\ss).

3)I did the select statement again.Now it have a value - generated by a trigger.

SQL> select * from dummy;

       VAL


        99

Basically, what I need is actually different. I want the trigger to generate a value
even in the form I "didn't save the record yet".

4)Now I go back to the Define Item form and create a new item. I run the Select Statement again. The trigger doesn't run

SQL> select * from dummy;

       VAL


        99

Is it possible to be done? Another thing is, when I fill the column in the Define Item Form, it still doesn't have any interaction with the database itself (I mean it still doesn't insert the record), am I correct ?. Beside of the 3 option you give me before, can database trigger handle this. If possible I don't want to touch the form by having a customization, unless I don't have any other option. I hope my explanation will make the problem clerer. Again, thanks for your participation. I greatly appreciate that!

Azman (The Oracle Junior)

In article <70kc3o$igj$1_at_schbbs.mot.com>,   "Alan D. Mills" <alanmNOSPAM_at_uk.europe.mcd.mot.com> wrote:
> Quite simply, if you want to change the functionality of the form at runtime
> you have three options:
>
> 1) Change the form itself. This involves coding.
> 2) Change the code within a called library, again coding.
> 3) Change code within database procedures and functions, again coding.
>
> All will involve the forms designer, if only to find out what database
> procedure is being executed.
>
> Another idea I just thought of is to write database triggers on the the
> table in question so that when an insert takes place you can make perform
> DML on your own table.
>
> Good luck!
>
> --
> Alan D. Mills
>
> internetual_at_my-dejanews.com wrote in message
> <70k23d$stb$1_at_nnrp1.dejanews.com>...
> >I have an "Oracle Application" (Oracle Manufacturing).
> >One part of this module is "Define Item form" where we
> >define all the item in the system.This form is associate
> >with the MTL_SYSTEM_ITEMS table in Oracle Database.
> >
> >I just want to ask a basic question. How can I create
> >a "form level trigger". I understand the database trigger.
> >I ask this because:
> >
> >Let say the user entered an item name, before he/she save the
> >data I want to do something on my own table (not oracle table)
> >let say inserting data which value is coming from this form (ie
> >the item name).
> >
> >Do I need to customize the form itself?
> >
> >Appreciate any guide.
> >Oracle Junior
> >
> >-----------== Posted via Deja News, The Discussion Network ==----------
> >http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
>
>

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Wed Oct 21 1998 - 23:11:41 CDT

Original text of this message

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