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
Sorry to ask such a mundane question, but I cannot find this documented anywhere, nor asked by anyone else.
Is it safe to use a single Microsoft.Data.SqlClient.SqlConnection instance from multiple threads? Each thread creates its own SqlCommand against the SqlConnection.
Ostensibly, this works. But I'm trying to figure out whether it's working by accident or whether it's a ticking time-bomb.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Sorry to ask such a mundane question, but I cannot find this documented anywhere, nor asked by anyone else.
Is it safe to use a single
Microsoft.Data.SqlClient.SqlConnection
instance from multiple threads? Each thread creates its ownSqlCommand
against theSqlConnection
.Ostensibly, this works. But I'm trying to figure out whether it's working by accident or whether it's a ticking time-bomb.
Beta Was this translation helpful? Give feedback.
All reactions