Solved

Insert_Record Built-In

Posted on 2001-07-20
12
1,903 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
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
Technology Partners: 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

Industry Leaders: 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!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Why  don't I see Below columns in my  Stored Procedure  under TMP_RS? 8 27
Fill Null values 5 36
Fill Date time Field 12 29
Excess Redo 3 31
I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
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 video shows how to recover a database from a user managed backup

713 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