防止ADO连接SQL Server时的隐式连接[7]

[入库:2005年8月18日] [更新:2007年3月24日]

本文简介:选择自 zhengyun_ustc 的 blog

prb: implicit connections created by the sql server ole db provider (sqloledb) are not pooled

 

【不会重复建立数据库连接的代码片断】:

 

通过改变ado.recordset的属性避免隐式登录 

dim cn as new adodb.connection
dim rs as new adodb.recordset
dim rs2 as new adodb.recordset
cn.open ..........

 

rs.cursortype = adopenstatic

rs.activeconnection = cn
rs.open "select * from orders"

rs.cursortype = adopenstatic
rs2.activeconnection = cn

本文关键:ado sql server connection recordset command
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top