Home » Developer & Programmer » Forms » Pre-Insert Trigger (6i)
Pre-Insert Trigger [message #355623] Sun, 26 October 2008 10:48 Go to next message
rajput.anshu
Messages: 45
Registered: October 2008
Location: Bangalore
Member
When we want to write a Pre-Insert Trigger. Please Explain Briefly. This question asked me in an interview.
Re: Pre-Insert Trigger [message #355627 is a reply to message #355623] Sun, 26 October 2008 11:42 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Start "Forms Developer". Go to "Help" menu and select "Online Help ...". Type "pre-insert" into the "Search" field; perform search. Open reference to the PRE-INSERT trigger. Read it.
Re: Pre-Insert Trigger [message #355738 is a reply to message #355627] Mon, 27 October 2008 05:02 Go to previous messageGo to next message
rajput.anshu
Messages: 45
Registered: October 2008
Location: Bangalore
Member
Yaa I already seen there. And it shown that "Fires during the Post and Commit Transactions process, before a row is inserted. It fires once for each record that is marked for insert".
But my question is why we want to commit before insert(Pre-Insert) and during insert(On-Insert) and then After insert(post-Insert).I didn't understand this things. Please help me. After all why we want to write this trigger.Thanks.
Re: Pre-Insert Trigger [message #356223 is a reply to message #355738] Thu, 30 October 2008 00:35 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
You are not doing a 'commit' before 'pre-insert'. You have already posted the conditions under which the 'pre-insert' trigger will fire.

This trigger gives you the opportunity to 'do work' AFTER the user has entered their data and before the reocrd is 'saved' to the database. The trigger can be used to populate things like audit information and generated sequence numbers.

David
Re: Pre-Insert Trigger [message #356520 is a reply to message #356223] Fri, 31 October 2008 00:05 Go to previous messageGo to next message
rajput.anshu
Messages: 45
Registered: October 2008
Location: Bangalore
Member
Thanks David.....
Re: Pre-Insert Trigger [message #357110 is a reply to message #356520] Tue, 04 November 2008 00:18 Go to previous messageGo to next message
rajput.anshu
Messages: 45
Registered: October 2008
Location: Bangalore
Member
Thanks David. I understand that which trigger will fire when, like when we press the button then When-Button-Pressed trigger will fire.But I don't know what is the purpose of writing a trigger. To write a trigger there is a reason behind that means what a coding its contain. That's what i don't unserstand Pre-insert trigger deeply and so on. Will u guide me some site which give the information of triggers briefly.
Re: Pre-Insert Trigger [message #357547 is a reply to message #357110] Wed, 05 November 2008 17:59 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
My approach is to use the wizards to build the form. Then if I need extra code, I add it. I don't start out by thinking about which triggers I will be coding. I let the application determine that for me.

David
Previous Topic: client_text_io.put() utilityin oracle 10g forms with application server10g
Next Topic: Time In & Out
Goto Forum:
  


Current Time: Mon Feb 03 14:54:27 CST 2025