Code for PRE INSERT (merged by CM) [message #448275] |
Mon, 22 March 2010 08:12 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
atifzaman617
Messages: 7 Registered: September 2005 Location: PUNJAB
|
Junior Member |
![atifzaman617%40yahoo.com](/forum/theme/orafaq/images/yahoo.png)
|
|
I have created a fome in form 6i. I need code for PRE INSER trigger. I don't have any idea to write it. Here is information about my VENDOR table.
In form data block name is also VENDOR and field is VENDOR_ID
VENDOR_ID NOT NULL NUMBER(4) (THIS IS PRIMARY KEY)
VENDOR_NAME NOT NULL VARCHAR2(50)
ADDRESS NOT NULL VARCHAR2(50)
CITY NOT NULL VARCHAR2(50)
COUNTRY NOT NULL VARCHAR2(50)
PHONE_NO VARCHAR2(15)
FAX_NO VARCHAR2(15)
SALETAX_NO VARCHAR2(20)
AMOUNT_PAYABLE NUMBER(8,2)
AMOUNT_RECEIVEABLE NUMBER(8,2)
Please check this and write code for my.
Do let me know if you need any information.
|
|
|
|
Re: Code for PRE INSERT (merged by CM) [message #448290 is a reply to message #448275] |
Mon, 22 March 2010 10:15 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
gregor
Messages: 86 Registered: March 2010 Location: Germany
|
Member |
|
|
Hello atifzaman617 ,
what ever you do,
Database-Table-Columns, defined as "NOT NULL" must
be filled. One way to fill is the Pre-insert Trigger.
You haven't to write any Code, if your "VENDOR-Block"
is based on a Database-Table.
In your example:
Use sequence to fill -> VENDOR_ID NOT NULL
filled by user input --> ADDRESS NOT NULL
filled by user input -->CITY NOT NULL
filled by user input -->COUNTRY NOT NULL
|
|
|