read datareader stream and read output parameters at the same time

G

Guest

Been working through a few scenario's where I have returned a stream of data
to the datareader and also returned some output parameters from a stored
procedure. The question is in order to get the parameters returned from the
stored procedure you have to close the datareader. Then you are unable to
step through the stream return ie in a list format. can anyone advise the
best way to do this at the minute i am making to calls one to get the output
params and the second to then step through the datareaders stream.

The only way I can think is to pass the result to a dataset and then close
the reader to expose the output params ????!!!!!!???????

Regards Ben
 
M

Miha Markic [MVP C#]

Hi ben,

I think that you'll have to read entire stream returned by datareader to get
to the output parameters.
(Close does read all the stream).
You might call two stored procedures - one that returns parameters and the
other returns stream.
 

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