Solved

Insert_Record Built-In

Posted on 2001-07-20
12
1,914 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 3
  • 2
  • +1
12 Comments
 
LVL 2

Expert Comment

by:vanmeerendonk
ID: 6301959
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 48

Expert Comment

by:schwertner
ID: 6301985
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 48

Expert Comment

by:schwertner
ID: 6302064
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 27

Expert Comment

by:kretzschmar
ID: 6302101
use
create_record
instead of
insert_record
in your when-button-pressed trigger

meikl ;-)
0
 

Author Comment

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



thanks again


Hassan
0
 

Author Comment

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



thanks again


Hassan
0
 

Author Comment

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



thanks again


Hassan
0
 

Author Comment

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



thanks again


Hassan
0
 

Author Comment

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



thanks again


Hassan
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 6304862
well,

then you should reject vanmeerendonk's answer
and grade me

glad to helped you

meikl ;-)
0
 

Author Comment

by:hayub
ID: 6305758
I accept kretzschmar answer and give him the rating A.



thanks again



Hassan
0
 
LVL 27

Accepted Solution

by:
kretzschmar earned 50 total points
ID: 6305808
well, hassan,

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

meikl ;-)

0

Featured Post

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.

739 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