read datareader stream and read output parameters at the same time

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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.
 
Back
Top