Solved

Insert_Record Built-In

Posted on 2001-07-20
12
1,850 Views
Last Modified: 2007-11-27

I'm trying to attach a trigger to a button, so that every time the button is pressed, insert_record built in should be executed and it should have the same function as that of the default menu option.
  The form builder error says that insert_record built-in can only be used with the On_Insert trigger but in case of the button there is no On_insert trigger option. Is there any other way I can accomplish this.

Thanks

regards

Hassan
0
Comment
Question by:hayub
  • 6
  • 3
  • 2
  • +1
12 Comments
 
LVL 2

Expert Comment

by:vanmeerendonk
Comment Utility
code in your when-button-pressed :
EXECUTE_TRIGGER('ON-INSERT');

and code a ON-INSERT trigger on module-level.
Here you kan use the insert_record;

0
 
LVL 47

Expert Comment

by:schwertner
Comment Utility
Forms Builder automatically creates INSERT, UPDATE, DELETE statements when you insert, update or mark for delete records in the blocks of your form.

So the only you need is to activate the implicit DML statements using the EXIT_FORM, CLOSE_FORM built-ins in the WHEN-BUTTON-PRESSED trigger.
0
 
LVL 47

Expert Comment

by:schwertner
Comment Utility
If you need to make additional inserts (excluding the automatcal) you can use the POST_INSERT, POST_UPDATE, POST_DELETE and even POST_QUERY trigger on block or above level.
0
 
LVL 27

Expert Comment

by:kretzschmar
Comment Utility
use
create_record
instead of
insert_record
in your when-button-pressed trigger

meikl ;-)
0
 

Author Comment

by:hayub
Comment Utility
Thanks a lot guys... I tried kretzdchmar option and it works perfectly fine....



thanks again


Hassan
0
 

Author Comment

by:hayub
Comment Utility
Thanks a lot guys... I tried kretzdchmar option and it works perfectly fine....



thanks again


Hassan
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

Author Comment

by:hayub
Comment Utility
Thanks a lot guys... I tried kretzdchmar option and it works perfectly fine....



thanks again


Hassan
0
 

Author Comment

by:hayub
Comment Utility
Thanks a lot guys... I tried kretzdchmar option and it works perfectly fine....



thanks again


Hassan
0
 

Author Comment

by:hayub
Comment Utility
Thanks a lot guys... I tried kretzdchmar option and it works perfectly fine....



thanks again


Hassan
0
 
LVL 27

Expert Comment

by:kretzschmar
Comment Utility
well,

then you should reject vanmeerendonk's answer
and grade me

glad to helped you

meikl ;-)
0
 

Author Comment

by:hayub
Comment Utility
I accept kretzschmar answer and give him the rating A.



thanks again



Hassan
0
 
LVL 27

Accepted Solution

by:
kretzschmar earned 50 total points
Comment Utility
well, hassan,

then you should do it :-)
(maybe its easier when i post this as answer)

meikl ;-)

0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Article by: Swadhin
From the Oracle SQL Reference (http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/queries006.htm) we are told that a join is a query that combines rows from two or more tables, views, or materialized views. This article provides a glimps…
Subquery in Oracle: Sub queries are one of advance queries in oracle. Types of advance queries: •      Sub Queries •      Hierarchical Queries •      Set Operators Sub queries are know as the query called from another query or another subquery. It can …
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now