DataReader... and ...

  • Thread starter Thread starter John Smith
  • Start date Start date
J

John Smith

I am using .NetFramework 1.1. and SQL2K.

I am calling a stored procedure and it has multiple results set and

some output parameters.

If the output parameter does not meet certain condition, I am quitting

the stored procedure (SP) by calling "return" statement which results

in SP not returning any result set further.

Since output parameters of the stored procedure is the last result set

in a data reader, my code has to process the result set first and then

output result set.

What is the thoughtful process behind making output parameters of a

stored procedure as the last result set in a datareader?

Thanks,

John
 
They are not the last "results set" in the reader. When using a DataReader,
the output parameters are there after you close the DataReader. If you were
to use the DataAdapter's fill method, the parameters would be there
immediately.

As to why they are like that, I could speculate, but if you need the
information in the output parameters first, perhaps you should place them in
a select first, so you will have the information as the first recordset.

bill
 
Back
Top