hi all

Please help me out with the following scenario,
One of my proc does this:

1- Make a type "searchCursor" of ref cursor type.
2- create 2 instance of this type, i- shogenUnit_Cur ii- Model1_cur
3- Write 2 seperate queries
4- Associate the two cursors with the queries
5- open the cursors
6- Fetch records from both the cursors.
7- Oracle minds this, and never returns control to me my question is WHY?

Can Somebody help me with this? My final goal is to open ten cursors at the same time (ofcourse ten different queries) and return them (by making cursor OUT parameter). from the frontend I want to get the ten cursors at the same time and show the values on the webpage? Any problem with this??

Please have a look at the code.....

Create or Replace Package SearchPkg
is
Type searchCursor is ref cursor;
End SearchPkg;

Create or Replace Package Body SearchPkg
is
Procedure getSearchResults(langId in varchar2, modelList in varchar2, shogenList in varchar2)
is
shogenUnit_Cur searchCursor;
Model1_cur searchCursor;
Begin

shogenUnitSQL :='Select
a.Shogen_Desc,
b.Tani_Desc
From
Shogen a, Unit b
Where
b.lang_id (+) = a.lang_id
And
b.Tani_Cd (+) = a.SI_Unit And
a.Shogen_no in ('||shogenList||')';

Open shogenUnit_Cur For shogenUnitSQL;
modelSQL := 'Select
si_val,
txtval
From
ShogenValue a
Where
a.lang_id = '||to_number(langId)||'
And
a.Model_id = '||to_number(l_modelId)||';
Open Model1_cur For modelSQL;

Loop
Fetch shogenUnit_Cur into value;
put_any_line(value);

Exit When shogenUnit_Cur%NotFound;
End Loop;


Loop
Fetch Model1_cur into value;
put_any_line(value);
Exit When Model1_cur%NotFound;
End Loop;
End;

thanx for ur help