Re: Looping On Block Data

From: Connor McDonald <connor_mcdonald_at_yahoo.com>
Date: Fri, 13 Aug 1999 16:18:43 +0800
Message-ID: <37B3D4E3.7A85_at_yahoo.com>


Greg James wrote:
>
> I'm migrating an app to oracle ( forms 4.5 ) and I have a rookie question.
>
> I have a block that displays ten rows of table data (same base table). The
> 'WHERE' clause property for the block may return any number of records.
>
> I need to process each record, row by row, in a pushbutton trigger. What is
> the easiest way to Loop through the records without knowing how many records
> will be present?
>
> Could I trap a FRM-40352 error within the loop so that if I hit the last
> record, the code would drop out of the loop? Thanks.

Have a look at get_block_property and the :system variables which can tell you when you are at the last record. You can loop thru the block using go_record and next_record.

-- 
===========================================
Connor McDonald
"These views mine, no-one elses etc etc"
connor_mcdonald_at_yahoo.com

"Some days you're the pigeon, and some days you're the statue."
Received on Fri Aug 13 1999 - 10:18:43 CEST

Original text of this message