This discussion is archived
2 Replies Latest reply: May 7, 2007 9:36 AM by zaibiman RSS


548780 Newbie
Currently Being Moderated

i have to get the count of the records returned by a query on a block,
for example user may enter 'BR%' in a text field and press the 'F8' key , at this time i have to get the count of records also i have tried like below to get the count in when-new-record-instance and post-query

cnt := to_number(Get_Block_Property( 'main_table', Query_Hits));
: :=cnt;

when-new record-instance taking time depends on the number of records and post-query shows error frm - 40734.

could anybody tell me what exactly the solution ? Thanks Bcj
  • 1. Re: count_query
    Rosario Vigilante Journeyer
    Currently Being Moderated
    [url] How to get total count of records in Datablock

  • 2. Re: count_query
    zaibiman Newbie
    Currently Being Moderated
    use this in only post-query trigger,


    --control and count are non database

    if :system.form_status='QUERY' then
    end if;

    end ;

    if u only one record is fetched the result is 0 , since the counter starts from 0... so u can add 1