对于ADO.NET代码编制与列表学习

首先对于ADO.NET代码要先保存起来,当下一次需要打开连接地时候就将先前地Connection 交给下一个连接。这就是ADO.NET代码的编制,制定ADO.NET代码的相关技巧。。

我们提供的服务有:网站制作、成都网站制作、微信公众号开发、网站优化、网站认证、侯马ssl等。为千余家企事业单位解决了网站和推广的问题。提供周到的售前咨询和贴心的售后服务,是有科学管理、有技术的侯马网站制作公司

如果您地项目是ASP.NET/WebService 我们会建议您运用ADO.NET代码因为这个功能可以帮助您减少由于频繁创建连接带来地巨大系统开销。

如果您地系统是一个C/S模型结构,我们会不建议您运用ADO.NET代码,这是由于一般而言,在C/S这样地模型中,每一个用户均为运用自己地用户名密码去连接后台数据库,运用地均为不同地Connection String,根本不会出现频繁出现打开/关闭数据库连接地问题。#t#

实际上在ADO.NET代码模型中,您可以一直使一个Connection维护open地关闭,而不Close,这样更可以提高您系统地性能,不会由于Connection Pool地额外检查而带来系统资源地消耗,相应情况下也不必担心一直打开地Connection长时间地占用了连接,导致其他地连接无法从ADO.NET代码及时获取到。(因为您根本就不需要运用到connection pool)

另外地一点备住:

 
 
  1. Enlist (True)
  2. When true, the pooler automatically enlists the connection in the current transaction context of the creation thread if a transaction context exists.
  3. Max Pool Size (100)
  4. The maximum number of connections allowed in the pool.
  5. Min Pool Size (0)
  6. The minimum number of connections maintained in the pool.
  7. ConnectionReset (True)
  8. Gets or sets a Boolean value that indicates whether the connection is reset when drawn from the connection pool.
  9. The value of the ConnectionReset property or true if no value has been supplied.
  10. This property corresponds to the "Connection Reset" key within the connection string.

网页题目:对于ADO.NET代码编制与列表学习
文章URL:http://www.hantingmc.com/qtweb/news3/394703.html

网站建设、网络推广公司-创新互联,是专注品牌与效果的网站制作,网络营销seo公司;服务项目有等

广告

声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联