Home » Developer & Programmer » Forms » Simple Loop does not populate the block correctly (Ora Forms 10)
Simple Loop does not populate the block correctly [message #399720] Thu, 23 April 2009 12:23 Go to next message
Messages: 1
Registered: April 2009
Junior Member

this Statement in a procedure should populate a block of rows and coloumns.

for rec in
(select knf_kuerzel as system,
testfall_nr as tfnr,
test_dat as td,
ergebnis_kz as te,
test_wer as tw,
testfall_wer as tfw,
test_protokoll as tp
from sco_test_faelle
order by testfall_nr

-- record in block schreiben
:bl_testfaelle.tf_knf_kuerzel := rec.system;
:bl_testfaelle.tf_testfall_nr := rec.tfnr;
:bl_testfaelle.tf_testdatum := rec.td;
:bl_testfaelle.tf_ergebnis_kz := rec.te;
:bl_testfaelle.tf_test_wer := rec.tw;
:bl_testfaelle.tf_testfall_wer := rec.tfw;
:bl_testfaelle.tf_testprotokoll := rec.tp;

end loop;

The statement fetches all data correctly but Forms inserts the
selected rows all in the first row of the block.

Create_record does not work correctly.

It's the first time I'm programming with Forms 10.
In 1999 I coded the last Forms program on Forms 4.5, so
I'm not really a Forms - specialist Wink

Hoping someone can help, thanks for all

Re: Simple Loop does not populate the block correctly [message #399732 is a reply to message #399720] Thu, 23 April 2009 15:11 Go to previous messageGo to next message
Messages: 20848
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Such a question has already been asked (and answered). Perhaps you should pay attention to suggestions provided in the OraFAQ Forum Guide; it will - among others - tell you to use our Search engine. Doing so, you'd probably find the answer (or at least guidelines) to your question, much sooner than waiting for a message like this one (mine).

As of your problem: you are looping through certain records, put values into block items, but never move to the NEXT_RECORD.
Re: Simple Loop does not populate the block correctly [message #401437 is a reply to message #399720] Tue, 05 May 2009 01:00 Go to previous message
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Populate block using cursor
and my feelings about it.
Another one of my rants.

Previous Topic: How to delete some last record on a non-database block(tabular)
Next Topic: Alternative for varchar2?
Goto Forum:

Current Time: Fri Oct 21 10:27:31 CDT 2016

Total time taken to generate the page: 0.08008 seconds