SQLDATAREADER

  • Thread starter Thread starter Arvind P Rangan
  • Start date Start date
A

Arvind P Rangan

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.
 
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
 
Back
Top