By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,973 Members | 1,854 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,973 IT Pros & Developers. It's quick & easy.

SQLDATAREADER

P: n/a
Hi All,

How do you get all the values of a sqldatareader if it
contains multiple resultset.
Using sqldatareader.nextresult and sqldatareader.read

e.g.
While sqldatareader.read '
If not sqldatareader then
sqldatareader.nextresult
else
---do something
end if
while end

I get the values but due to two sqldatareader.read one
more record is skiped how do i avoid it.

Thanks
Arvind.

Nov 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
SSW
Try below code.

Do Until sqldatareader Is Nothing

Do Until sqldatareader.EOF
Debug.Print , sqldatareader.Fields(0)
---do something
sqldatareader.MoveNext
Loop

Set sqldatareader= sqldatareader.NextRecordset
Loop

Thanks,

sswalia
MCAD, MCAD, OCA

"Arvind P Rangan" <ar******@hotmail.com> wrote in message
news:02****************************@phx.gbl...
Hi All,

How do you get all the values of a sqldatareader if it
contains multiple resultset.
Using sqldatareader.nextresult and sqldatareader.read

e.g.
While sqldatareader.read '
If not sqldatareader then
sqldatareader.nextresult
else
---do something
end if
while end

I get the values but due to two sqldatareader.read one
more record is skiped how do i avoid it.

Thanks
Arvind.

Nov 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.