Link to home
Start Free TrialLog in
Avatar of Jimbo99999
Jimbo99999Flag for United States of America

asked on

VB.Net - DataReader Looping

Good Day Experts!

What is your preference to looping through a DataReader?  

I have seen:

While reader.Read()

End While

**************************

With reader
     .Read()
     Do While .HasRows

     Loop
End With

What are the pros/cons if any between the 2?

Thanks,
jimbo99999
ASKER CERTIFIED SOLUTION
Avatar of Nasir Razzaq
Nasir Razzaq
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Jimbo99999

ASKER

Thanks for the feedback as I continue my journey.