Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Forms 4.5 - Too Many Rows

Re: Forms 4.5 - Too Many Rows

From: Alan D. Mills <alanmNOSPAM_at_uk.europe.mcd.mot.com>
Date: Thu, 6 Aug 1998 15:40:28 +0100
Message-ID: <6qcf89$dji$1@schbbs.mot.com>


Are you doing a SELECT ... INTO screenitem? If so that's why. All records retrieved from you query are trying to be placed into the current record of the block in question.

What I think you need is

Write youyr SQl as a cursor in a PL/SQL block.

Move to block using GO_BLOCK('MYBLOCK'); Go_Record(1) // make sure you;re at the start of the block. for each record retrieved
{

    populate field of current block;
   Next_Record;
}

Of course f it is a base table block you are populating you will be creating new records and so a commit will be in order.

Also, the above code uses restricted package procedures so you;ll have to be careful which trigger you place it (or call it) in.

--
Alan D. Mills

Nick Lehane wrote in message
<01bdc13c$e2fa60a0$eb58ea9e_at_ukp016543.logica.co.uk>...
>I am having a problem with a Too_Many_Rows exception which arises because
>of the following:
>
>I supply a ref no in a control text item and have a button which has a When
>Button Pressed event that searches the database and populates a block of
>display items.
>
>The block is set to display 10 items, and I am using a reference which I
>know returns 8 rows. The problem is that the Too_Many_Rows exception comes
>up because the trigger is trying to populate all matches into one line of
>the display block. Is there a way that I can get it to automatically move
>to the next line of the display block each time a record is found?
Received on Thu Aug 06 1998 - 09:40:28 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US