Skip to Main Content

Oracle Forms

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Problems using cursor and post query trigger.

twinklin_girlJun 24 2009 — edited Jun 26 2009
Hello,

I am using a non-database/dummy block to query records found in a database block . My form has a text item "report No" which will be used to enter a valid report number . Based on this report number , I hit a search button (also from the same non-database block) to display records having this "report No" in the database block . I think I need to use a cursor in a post query for that but I'm no succeeding in making it work :( Please help !!! I really need to figure this out as nobody helps me at work :(

My search button -when button pressed trigger :
DECLARE
CHOICE NUMBER;
BEGIN
IF :DUMMY_BLK.RPTNO IS NULL THEN
ALERTS.STOP_ALERT('Start Date is required', choice);
RAISE FORM_TRIGGER_FAILURE;
END IF;
go_block('T_VESSEL_BLK');
execute_query;
END;

My post_query:

DECLARE
cursor vessel_cur is
SELECT VES_RPTNO,VES_SENDER,VES_SENDER_MBOX,VES_INTCTRL_REF,VES_NAME,VES_VOYNO,VES_ARRDT
FROM VESSEL
WHERE VES_RPTNO = :DUMMY_BLK.RPTNO;
var_mot vessel_cur%ROWTYPE;
BEGIN
open vessel_cur;
LOOP
fetch vessel_cur into var_mot;
EXIT WHEN vessel_cur%NOTFOUND;
END LOOP;
close vessel_cur;
END;
This post has been answered by Andreas Weiden on Jun 25 2009
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 24 2009
Added on Jun 24 2009
35 comments
3,855 views