Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6599943
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T18:33:27+00:00 2026-05-25T18:33:27+00:00

When I have multiple DBDataReaders reading data at the same time I get the

  • 0

When I have multiple DBDataReaders reading data at the same time I get the following error:

There is already an open DataReader associated with this Connection which must be
closed first

I have ConnectionPooling enabled in my config so I don’t understand why I am getting this error. Doesn’t it suppose to create a new connection since my current connection is already in use?

I know that setting MultipleActiveResultSets to true would fix the problem, but I’m still trying to understand why the problem exist

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T18:33:27+00:00Added an answer on May 25, 2026 at 6:33 pm

    Connection pooling does not do what you think it does.

    If you do something like this

    var connection = new SqlConnection(connectionString);
    connection.Open();
    var command = connection.CreateCommand();
    command.CommandText = // some query
    var reader = command.ExecuteReader();
    var anotherCommand = connection.CreateCommand();
    anotherCommand.CommandText = // another query
    var anotherReader = anotherCommand.ExecuteReader();
    

    then all of this will happen on one connection, whether or not you have connection pooling.

    Connection pooling just keeps a cache of connections that you can draw from every time that you create a new connection (new SqlConnection) and open it (SqlConnectinon.Open). When you close a connection, it returns to the pool to be reused. But one open SqlConnection object corresponds to one connection from the pool. Period.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have multiple copies of the same form (jobs for a resume, only hidden
I have multiple elements with the same class clickable, i'm binding all these classes
I have multiple threads adding, modifying and looking up data in GHashTable. Is it
I have multiple test methods that depend on the same Mole redirection, and in
I have multiple pages containing the same partial view. The partial contains a form
I have multiple csv files with the same scheme, and I want to import
i have multiple websites on the same server. I want to have a link
I have multiple webpages that work together. Most of them have the same css
We have multiple projects in our system that want to share the same asmx
I have multiple entry points in the same module. For example I have an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.