How Do You Use Two Data Readers At Same Time Within VB .NET 2010

I was wondering if it was possible to run two data readers that would access the same database at the same time. (The purpose is to save memory depending of if certain logic is required in order to call tthe second data reader. The purpose is to limit how much data is loaded into RAM memory on a server.) These two data readers would be attached to the same database and would be accessing two different tables that are within the same database. Would this be possible, number one? Is there a better way to use data readers to pull from another table to make a more complex query after the data has been called from the inital data reader to limit the amount of memory being used due to the results set that would be returned from the query that is passed to each of the data readers, with the second one being dependent on whether or not a block of code would be called or not.
thenthorn1010Asked:
Who is Participating?
 
Éric MoreauSenior .Net ConsultantCommented:
this is known as MultipleActiveResultSets (MARS).

check http://www.emoreau.com/Entries/Articles/2006/11/MARS-and-Asynchronous-ADONet.aspx
0
 
CodeCruiserCommented:
You have to use two separate connections.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.