Re: forms4.x: display multi-record block

From: S. Kannan <skannan_at_cardinal.fs.com>
Date: 1995/09/05
Message-ID: <42ia93$e0n_at_cardinal.fs.com>#1/1


Leng Kaing (leng_at_cougar.vut.edu.au) wrote:
: Hello :-
: I'm attempting to write a trigger to display multiple records on the
: one block when someone presses the query button - similar to what the
: Query | Execute menu item achieves. I've written a pl/sql block but
: the records fetched keeps getting displayed on the first row of the
: block. As such I can only see the last record of the database.
: Please show me how to see them all at the same time, in separate rows.
 

: Here's my code:
 

: declare
: CURSOR dept_cur is
: select deptno, dname, loc from dept;
: begin
: for dept_rec in dept_cur loop
: :deptno := dept_rec.deptno;
: :dname := dept_rec.dname;
: :loc := dept_rec.loc;
: next_item;
: end loop;
: end;
:
: TIA,
: Leng.
: --
: Leng Kaing - Software Consultant/DBA Tel: +61-3-9688-4368
: Dept of IT&S, VUT - Footscray Campus Fax: +61-3-9688-4800
: PO Box 14428, MCMC Email: leng_at_cougar.vut.edu.au
: Melbourne 8001, Australia WWW: http://www.vut.edu.au/~leng

--

Hi,

Use the Create_Record built_in in place of Next_item. Next_Item navigates to 
the next field. Also you'll need to ensure that Create_Record does not fire 
if there are no rows in the dept_cur cursor.

Hope this helps.
---------------------------------------------------------------------------
Kannan 
Email: skannan_at_fs.com
Mastech Systems Corporation

The above are my own comments and opinion. They do not purport that of 
anybody else.
---------------------------------------------------------------------------
Received on Tue Sep 05 1995 - 00:00:00 CEST

Original text of this message