If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Oracle > Record counts in a Form data block

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old
Registered User
 
Join Date: Sep 2004
Location: Toronto, ON Canada
Posts: 2
Record counts in a Form data block

Hi,
How do I get the record count from a data block in Oracle Forms?

Thanks,

Rushdi
Reply With Quote
  #2 (permalink)  
Old
Lost Boy
 
Join Date: Jan 2004
Location: Croatia, Europe
Posts: 3,962
As Anacedent would say ... RTFM

Online Forms Builder Help offers you, for example, COUNT_QUERY built-in. Play with it a little bit ...

Or, you could also write a code by yourself:
Code:
declare 
  cnt number := 1;
begin
  go_block('your_block');
  first_record;

  while :system.last_record = 'FALSE' 
  loop
     cnt := cnt + 1;
     next_record;
  end loop;
  
  message('There are ' || cnt || ' records in this block');
end;
Both have to be used in / called from triggers that allow use of restricted procedures.
Reply With Quote
  #3 (permalink)  
Old
Lead Application Develope
 
Join Date: Jun 2004
Location: Liverpool, NY USA
Posts: 2,393
And one thing to remember, unless you specify all records on the execute query, the count returned by COUNT_QUERY or counting the blocks might be a sub-set of the total rows.
__________________
Bill
You do not need a parachute to skydive. You only need a parachute to skydive twice.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On