且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

从Web应用程序连接到SQL Server 2008 R2数据库

更新时间:2023-02-03 10:27:08

据我所知,打开和关闭连接没有任何问题。在需要时打开它,并在完成后立即关闭它。连接池将自动处理重用连接。



http://msdn.microsoft.com/en-us/library/8xx3tyca(v = vs.90).aspx [ ^ ]
As far as I know, there is no any issues with opening and closing the connection. Open it when you need it and close it as soon as you''re done with it. Connection pooling will automatically handle the reusing the connection.

http://msdn.microsoft.com/en-us/library/8xx3tyca(v=vs.90).aspx[^]