摘要
动态的Web站点常常要从数据库中获得必要的数据来生成Web页面,因此Web应用程序与数据库之间将耗费巨大的开销来创建数据库连接,ADO.Net采用连接池来减少创建数据库连接的开销。但是,ADO.Net连接池中经常会出现非正常断开的连接,池管理程序会将这些实际无效的连接分配给请求的应用程序使用,应用程序在使用这些连接执行SQL语句时会发生连接异常,提出了避免在SQLServer.Net数据提供程序中出现这种连接异常的解决方案。
Dynamic website often gets the essential data from database to create web page, so it will consume heavy cost to establish database connection between web application and database. ADO .net uses connection pool to reduce this cost of establishing database connection. However, the abnormal disconnected connections often appear in ADO .net connection pool, the pool manager will allot these actually invalid connections to the request applications. When applications use these connections to execute SQL statement, con- nection exceptions are generated. A solution is shown to avoid these connection exceptions being generated in the SQL server .net data provider.
出处
《计算机工程与设计》
CSCD
北大核心
2005年第5期1341-1343,共3页
Computer Engineering and Design