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

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.