-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?

1

1 Answer 1

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
  }
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.