[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.aspnet.caching

are System.Data.SqlClient.SqlConnection thread safe? can many threads share a System.Data.SqlClient.SqlConnection instance without any synchronization?

Daniel

3/22/2006 5:59:00 AM

are System.Data.SqlClient.SqlConnection thread safe? can many threads share
a System.Data.SqlClient.SqlConnection instance without any synchronization?


1 Answer

Michael Nemtsev [MVP]

3/25/2006 1:52:00 PM

0

Hello Daniel,

Have you ever tried to look at MSDN first?

"Any public static (Shared in Visual Basic) members of this type are thread
safe. Any instance members are not guaranteed to be thread safe"

BTW, why not to use connection pooling?

D> are System.Data.SqlClient.SqlConnection thread safe? can many threads
D> share a System.Data.SqlClient.SqlConnection instance without any
D> synchronization?
D>
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.c...

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche