PC Review


Reply
Thread Tools Rate Thread

DataReader and Returned Parms

 
 
Jim Heavey
Guest
Posts: n/a
 
      19th Dec 2003
I have found that I am unable to read the parms until after I do a close on
the DataReader. Is that accurate?

In the instance where you are executing a procedure which returns multiple
answer sets, would this still be true?

So if I wanted to get the return value for each of the answer sets, I would
in the Procedure create a variable which would hold the RETURN_Value into
something like RETURN_VALUE1, RETURN_VALUE2....etc? Then after all the
answer sets have been returned I could then read the parameter return
values?

Thanks in Advance for your assistance....
 
Reply With Quote
 
 
 
 
Miha Markic
Guest
Posts: n/a
 
      19th Dec 2003
Hi Jim,

Yes, I think that you can read the return parameters only after you've read
all rows.

--
Miha Markic - RightHand .NET consulting & software development
miha at rthand com
www.rthand.com

"Jim Heavey" <(E-Mail Removed)> wrote in message
news:Xns945657AD199C9JimHeaveyhotmailcom@207.46.248.16...
> I have found that I am unable to read the parms until after I do a close

on
> the DataReader. Is that accurate?
>
> In the instance where you are executing a procedure which returns multiple
> answer sets, would this still be true?
>
> So if I wanted to get the return value for each of the answer sets, I

would
> in the Procedure create a variable which would hold the RETURN_Value into
> something like RETURN_VALUE1, RETURN_VALUE2....etc? Then after all the
> answer sets have been returned I could then read the parameter return
> values?
>
> Thanks in Advance for your assistance....



 
Reply With Quote
 
 
 
 
bruce barker
Guest
Posts: n/a
 
      19th Dec 2003
mostly correct, the parameters are returned after all result sets, you don't
need to close, just read all rows, for all result sets first (see
NextResult())

-- bruce (sqlwork.com)

"Jim Heavey" <(E-Mail Removed)> wrote in message
news:Xns945657AD199C9JimHeaveyhotmailcom@207.46.248.16...
> I have found that I am unable to read the parms until after I do a close

on
> the DataReader. Is that accurate?
>
> In the instance where you are executing a procedure which returns multiple
> answer sets, would this still be true?
>
> So if I wanted to get the return value for each of the answer sets, I

would
> in the Procedure create a variable which would hold the RETURN_Value into
> something like RETURN_VALUE1, RETURN_VALUE2....etc? Then after all the
> answer sets have been returned I could then read the parameter return
> values?
>
> Thanks in Advance for your assistance....



 
Reply With Quote
 
William Ryan
Guest
Posts: n/a
 
      19th Dec 2003
Check out Bill Vaughn's article Retrieving the Gozoutas
http://www.betav.com/msdn_magazine.htm
"Jim Heavey" <(E-Mail Removed)> wrote in message
news:Xns945657AD199C9JimHeaveyhotmailcom@207.46.248.16...
> I have found that I am unable to read the parms until after I do a close

on
> the DataReader. Is that accurate?
>
> In the instance where you are executing a procedure which returns multiple
> answer sets, would this still be true?
>
> So if I wanted to get the return value for each of the answer sets, I

would
> in the Procedure create a variable which would hold the RETURN_Value into
> something like RETURN_VALUE1, RETURN_VALUE2....etc? Then after all the
> answer sets have been returned I could then read the parameter return
> values?
>
> Thanks in Advance for your assistance....



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DataReader Limits data returned! TY Microsoft ADO .NET 4 24th Jun 2014 10:25 PM
How to process datareader nulls coming from datareader? JB Microsoft C# .NET 4 3rd Nov 2008 01:56 AM
Checking for datareader returned types at runtime =?Utf-8?B?Sm/Do28gQ29zdGE=?= Microsoft C# .NET 2 24th Mar 2006 03:47 PM
Should I close a datareader returned using daab? hansiman Microsoft ASP .NET 7 11th May 2005 01:02 PM
records returned from datareader error Davef Microsoft ASP .NET 1 28th Aug 2003 04:40 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:27 AM.