DataReader and Returned Parms

  • Thread starter Thread starter Jim Heavey
  • Start date Start date
J

Jim Heavey

I have found that I am unable to read the parms until after I do a close on
the DataReader. Is that accurate?

In the instance where you are executing a procedure which returns multiple
answer sets, would this still be true?

So if I wanted to get the return value for each of the answer sets, I would
in the Procedure create a variable which would hold the RETURN_Value into
something like RETURN_VALUE1, RETURN_VALUE2....etc? Then after all the
answer sets have been returned I could then read the parameter return
values?

Thanks in Advance for your assistance....
 
Hi Jim,

Yes, I think that you can read the return parameters only after you've read
all rows.
 
mostly correct, the parameters are returned after all result sets, you don't
need to close, just read all rows, for all result sets first (see
NextResult())

-- bruce (sqlwork.com)
 
Back
Top