DataReader and Returned Parms

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....
 
M

Miha Markic

Hi Jim,

Yes, I think that you can read the return parameters only after you've read
all rows.
 
B

bruce barker

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top