摘要:
Refer to http://stackoverflow.com/questions/814206/getting-db-connection-through-singleton-classYou won't be able to open multiple SqlDataReaders/Commands with the connection at the same time and will run into thread blocking issues if you are trying to share the same connection object with mult 阅读全文
posted @ 2012-09-03 14:31
webglcn
阅读(146)
评论(0)
推荐(0)
摘要:
Refer to http://blog.163.com/xhy_cy/blog/static/1049762320112305016599/ private readonly string connectionString; // only can be initializable once private static object syncRoot = new Object();//为了解决多线程,而添加的一个附加变量,以避免死锁 public static SConnection Instance{ get{ if (insta... 阅读全文
posted @ 2012-09-03 10:35
webglcn
阅读(151)
评论(0)
推荐(0)
浙公网安备 33010602011771号