How do you use two datareaders at the same time in a vb.net windows application ?


for example:

while(datareader1.read())

while(datareader2.read())

end while

end while

this is not allowed even though both datareaders have two different sets of data. can someone help me out with this please..is there another way to do this?
thank you

Showing Answers 1 - 2 of 2 Answers

VIkas

  • Nov 2nd, 2007
 

Try different connections

  Was this answer useful?  Yes

A database connection can only have one open datareader associated with it at anytime.  To do what you are looking to do in your example you must have two connections, one for each datareader.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions