DataReader... and ...

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
 
W

William F. Robertson, Jr.

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
 

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

Members online

No members online now.

Forum statistics

Threads
473,999
Messages
2,570,243
Members
46,836
Latest member
login dogas

Latest Threads

Top