If you really need to open multiple database connections at the same time (others say it is not necessarily a good idea), you can usually indicate in the connection line that this is necessary.
A typical scenario in which I used this is to use a DataReader to stream rows from a database table (since I donβt know how many rows I need in the extended one), and where then do I need to make additional queries on other database tables. I am doing this, not just one query, as this will require several complex joins, and my application has a good level of caching to reduce database queries.
For Microsoft SQL Server, you add MultipleActiveResultSets=True; to the connection string
source share