You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Better exception message for MySqlConnection misuse #565
Since MySqlConnector provides true async methods, some users want to invoke multiple "overlapped" operations, e.g., executing multiple ExecuteNonQueryAsync method calls simultaneously, e.g., #554, #560, #562.
This gives an error (probably inspired by Connector/NET): "There is already an open DataReader associated with this Connection which must be closed first."
We should create a documentation page that explains the problem, the two common forms of misuse (overlapping on the same thread, e.g., calling ExecuteNonQuery from within a while (reader.Read()) loop; multiple simultaneous async calls on different threads), and how to resolve the error. Then the exception message should be simplified ("Cannot start a second operation while this connection is in use"?) and have a link to that page.
Activity
bgrainger commentedon Sep 29, 2018
Implemented in 0.45.1.
bgrainger commentedon Oct 1, 2018
Documentation page is: https://mysql-net.github.io/MySqlConnector/troubleshooting/connection-reuse/