Home » Developer & Programmer » Forms » Code for PRE INSERT (merged by CM)
Code for PRE INSERT (merged by CM) [message #448275] Mon, 22 March 2010 08:12 Go to next message
atifzaman617
Messages: 7
Registered: September 2005
Location: PUNJAB
Junior Member

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 #448282 is a reply to message #448275] Mon, 22 March 2010 08:27 Go to previous messageGo to next message
cookiemonster
Messages: 12320
Registered: September 2008
Location: Rainy Manchester
Senior Member
Telling us what you want the PRE-INSERT trigger to do would be a good start.
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
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

Previous Topic: Show that a process is running
Next Topic: parse paramlist variable (mered by CM)
Goto Forum:
  


Current Time: Sun Sep 25 07:48:00 CDT 2016

Total time taken to generate the page: 0.03834 seconds