-1
Procedure GetDetails( ID as Varchar2,
                       Cursor1 OUT Cursor_Type,
                        Cursor1 OUT Cursor_Type ) AS

BEGIN

       OPEN CURSOR1 FOR 
              Select Name from User where UserID=ID;

       OPEN CURSOR2 FOR 
               Select Place from Dept where DeptID=ID;

END GetDetails;

How can I use Name & place values from 2 cursors?

Ben
  • 51,770
  • 36
  • 127
  • 149
rakesh
  • 13
  • 2

1 Answers1

3

Try using DataReader.NextResult to move to the next cursor. For example:

while (dr.Read())
{
  //first cursor goes here
}
if (dr.NextResult() == true)
{
  while (dr.Read())
  {
    //Second cursor goes here
  }
}
John Fisher
  • 22,355
  • 2
  • 39
  • 64
PANKAJ
  • 153
  • 1
  • 8