Unable to solve foreign Key problem [message #542582] |
Wed, 08 February 2012 02:17 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](//www.gravatar.com/avatar/bc527a3a024fa498a3a8c878ec82e08d?s=64&d=mm&r=g) |
new_oracle2011
Messages: 174 Registered: March 2011 Location: Qatar
|
Senior Member |
|
|
Actually, i want to insert into some table having the foreign key from the master table. I created following procedure
v_rec_id number;
v_sort_order number;
BEGIN
v_rec_id := get_rec_id;
v_sort_order := get_sort_order(p_report_no, p_report_yr);
insert into assist_report_requests (rec_id, report_yr, report_no, req_no, req_yr, create_user, create_date,print_counter, sort_order)
values (v_rec_id, p_report_no, p_report_yr, p_req_no, p_req_yr, user, sysdate,0, v_sort_order);
commit;
exception when others then
message('Error Code: '||sqlcode||' Error Message: '||sqlerrm);
raise form_trigger_failure;
END;
I have placed everywhere in the form like in POST-INSERT Trigger, Key-Commit Trigger (On block level), POST-FORM-COMMIT Trigger, POST-DATABASE-COMMIT (on form level). but still the problem is coming.
Is there some other way of doing this or some other trigger which i have to consider.
|
|
|
|
|
|
|