Current Position:Home > Post Query Trigger with cursor

Post Query Trigger with cursor

Update:11-30Source: network consolidation
Advertisement
Good afternoon to all of you!
I need your help. I create a master detail form. I created also a post quey trigger, inside I wrote the code below.
A cursor looks to another table and returns to the form some values i need!
declare cursor C1 is select apofaa,startdate,enddate,transport
from trapofdet
where trapofdet.apofcode = :trapof.apofcode;
begin
open C1;
loop
fetch C1 into :TRAPODOSI_NEW_NEW.APOFAA, :TRAPODOSI_NEW_NEW.STARTDATE, :TRAPODOSI_NEW_NEW.ENDDATE, :TRAPODOSI_NEW_NEW.TRANSPORT;
exit when C1%notfound;
next_record;
end loop;
close C1;
first_record;
null;
end;
How to solve the a. frm-40737, illegal restricted procedure go block in post-query trigger
b. It seems tha returns all the records but it appears only the last one.
Please can anybody help with these?
Thanks in advance!
Christos

The Best Answer

Advertisement
Christos,
The Post-Query trigger will fire once for each record returned to your form therefore you need to write your query to return a single row rather than a multiple rows. Using the Post-Query trigger to fetch additional data into your form can cause your form to be very slow - depending on the number of records returned and how many columns are fetched by your Post-Query cursor as well as how quickly the query executes.
Is your Post-Query trigger on your Master or Detail block. Are you using the Post-Query trigger to populate your Detail block? Are you using a Block Relationship to coordinate your Master and Detail blocks?
Also, it is helpful to know which version of Oracle Forms you're using.
Craig B-)
If someone's response is helpful or correct, please mark it accordingly.
  • Post Query Trigger with cursor Update:11-30

    Good afternoon to all of you! I need your help. I create a master detail form. I created also a post quey trigger, inside I wrote the code below. A cursor looks to another table and returns to the form some values i need! declare cursor C1 is select

  • Populate Form Field from Post-Query Trigger Update:11-30

    I have a form with some fields like "start_date", "company_id", "previous_start_date", "previous_company_id". Out of these, the "previous" fields are unbound and the others are bound to "my_companies&

  • Master-Detail Form - implementing some thing like Post-Query trigger Update:10-11

    Hi all, I am struggling to implement an eqivalent of a post-query trigger in Oracle Forms. Please bear with me as I am trying to explain in detail what the problem is. Here is my situation. I have three tables EMP, DEPT and LOCATION. I created a Mast

  • Select query on REF CURSOR Update:11-30

    Hi all, I am trying see if we can use LINQ like functionality to query a ref cursor resultset. I have about 50 procedures( as part of 12 packages) which send the ref cursor output to a front end application when called individually. Now I need to cre

  • [Help] statement.executeQuery(query) opens MULTIPLE cursors Update:11-30

    Hey everyone, I'm having a real hard time finding anything about this on the net so I've turned here. When we call: resultSet = statement.executeQuery(query) from a servlet for some reason that one executeQuery opens anywhere from 9-12 cursors in our

  • LEFT OUTER JOIN, Problem in POST-QUERY TRIGGER Update:11-30

    Hi, Please guide for the following I wrote below query in POST-QUERY Trigger of a TABULAR DATA BLOCK, having only one text item, called INVENTORY_ITEM select c.cat||' '||s.subcat||' '||l1.lvl1 ITEM INTO :DATABLOCK.INVENTORY_ITEM from itemcat c LEFT O

  • POST-QUERY TRIGGER Update:11-30

    Hello. I'm a newbie here. I'm currently studying Oracle Form Builder and I'm a student. I've encountered this problem where I need to create a post-query trigger in a data block that counts a total number of rows in a particular item using a display

  • Is there an Oracle Forms Post-Query trigger equivalent Update:11-30

    Hi. Jdeveloper 11.1.1.2 Is there a way in ADF to populate extra read-only text-columns in an af:table (based on a ViewObject) as was possible in Oracle Forms with a Post-Query-Trigger: Post-Query Perform an action after fetching a record, such as loo

  • Post-query trigger ? save changes? Update:11-30

    I have a similar problem to that posted by 'nova' on Dec. 27, 2000. I have a form generated by Designer. The problem is that upon subsequent querying (F8 pressed twice), it asks me if I want to save my changes, when I have not made any changes. I loo

  • POST-QUERY trigger cannot retrieve the database field in TEMPLATE.fmb Update:11-30

    I have tried to create a form using TEMPLATE.fmb in Oracle Apps R11i. I found that the POST-QUERY trigger cannot retrieve the database field (which is display item property) properly. Can anyone tell me how to retrieve the displayed database fields?