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

Re: read datareader stream and read output parameters at the same time by Miha

Miha
Tue Jan 04 07:31:54 CST 2005

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.

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
SLODUG - Slovene Developer Users Group
www.rthand.com

"ben" <ben@discussions.microsoft.com> wrote in message
news:1BFE7C27-640C-4276-B87D-8B95EC7C85BC@microsoft.com...
> 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