Home » Developer & Programmer » Forms » RETRIEVING MORE THAN ONE ROW IN FORM (Oracle forms (D2K), 10g, xp)
RETRIEVING MORE THAN ONE ROW IN FORM [message #573082] Thu, 20 December 2012 12:02 Go to next message
msat_param
Messages: 4
Registered: December 2012
Junior Member
Hi,

i have created two data blocks

First data data block contains a list item and a text item based on the selection of the list item and the value in the text item i need to retrieve more than one row in another data block whose NUMBER OF RECORDS DISPLAYED property are set to 10.

I have a Button in the first data block. So in the WHEN BUTTON PRESSED trigger i wrote SELECT INTO clause which is raising "exact fetch returns more than requested number of rows".
Then i used a cursor in the WHEN-BUTTON-PRESSED trigger in the first block to fetch row by row and assign it to the items in second block.
But i am able to retrieve only one record in the second block.

Pls help me out.

Re: RETRIEVING MORE THAN ONE ROW IN FORM [message #573098 is a reply to message #573082] Thu, 20 December 2012 14:23 Go to previous messageGo to next message
Littlefoot
Messages: 19648
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I believe that master-detail relationship is what you really should use. If both blocks are data blocks, I can't see a reason for you to reinvent the wheel.

Cursor might be used, true. I guess you "forgot" to move to NEXT_RECORD. Using it, you'd avoid repopulating the same (first) record all the time. However, I'd rather switch to master-detail, as I already said.
Re: RETRIEVING MORE THAN ONE ROW IN FORM [message #573184 is a reply to message #573098] Sun, 23 December 2012 06:22 Go to previous messageGo to next message
msat_param
Messages: 4
Registered: December 2012
Junior Member
ya but i think master details will work only on equality condition.
Moreover i have to retrieve the data from two tables into a single data block based on the join condition as well as based on the selection that i am going to make in the first block and that too it shud be displaying multiple rows (second data block in my example)
Re: RETRIEVING MORE THAN ONE ROW IN FORM [message #573185 is a reply to message #573184] Sun, 23 December 2012 08:38 Go to previous messageGo to next message
Littlefoot
Messages: 19648
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
OK then; did you put NEXT_RECORD into the loop you used? Did it fix your problem?
Re: RETRIEVING MORE THAN ONE ROW IN FORM [message #573224 is a reply to message #573185] Mon, 24 December 2012 06:32 Go to previous messageGo to next message
msat_param
Messages: 4
Registered: December 2012
Junior Member
yes i did but it has to retrieve conditionally nah?

any how am facing the same prob.

Thank you for replying can u pls try it and check it out?

Re: RETRIEVING MORE THAN ONE ROW IN FORM [message #573239 is a reply to message #573185] Mon, 24 December 2012 11:34 Go to previous message
cookiemonster
Messages: 10980
Registered: September 2008
Location: Rainy Manchester
Senior Member
msat_param wrote on Mon, 24 December 2012 12:39
yes i did but it has to retrieve conditionally nah?

any how am facing the same prob.

What does that mean?

msat_param wrote on Mon, 24 December 2012 12:39

Thank you for replying can u pls try it and check it out?


Why don't you post the code you wrote? It'd make it a lot easier for us to understand what you're trying to do and what the problem is.
Previous Topic: How to set Apache environment variables from Forms
Next Topic: How to Add Text items at run time?
Goto Forum:
  


Current Time: Tue Sep 30 10:21:38 CDT 2014

Total time taken to generate the page: 0.08697 seconds