ADO ActiveConnection 屬性
定義和用法
ActiveConnection 屬性可指示 Command 對(duì)象當(dāng)前所屬的 Connection 對(duì)象。
如果連接被關(guān)閉,它可設(shè)置或返回連接的定義。如果連接打開,它會(huì)設(shè)置或返回當(dāng)前的 Connection 對(duì)象。
語(yǔ)法
objcommand.ActiveConnection
實(shí)例
<% set conn=Server.CreateObject("ADODB.Connection") conn.Provider="Microsoft.Jet.OLEDB.4.0" conn.Open "c:/webdata/northwind.mdb" set comm=Server.CreateObject("ADODB.Command") comm.ActiveConnection=conn response.write(comm.ActiveConnection) conn.close %>