我想在if 语句判断 ado.connection 是否打开  如果打开就 将其关闭 如果是关闭的就set ado.connectiong= nothing
请高手赐教

解决方案 »

  1.   

    cn就是ado.connectionif cn.state=1 then
       cn.close
       set cn=nothing
    end if
      

  2.   

    if ado.connection.state=adstateoopen then 
      ado.connection.close
      set ado.connectiong= nothing
    end if
      

  3.   


    if ado.connection.state=open then 
      ado.connection.close
      set ado.connectiong= nothing
    end if
      

  4.   

    if ado.connection.state=open then 
      ado.connection.close
      set ado.connectiong= nothing
    end if
      

  5.   

    if ado.connection.state=adstateopen then 
          ado.connection.close
    endif 
      

  6.   

    if ado.connection.state=open then 
      ado.connection.close
      set ado.connectiong= nothing
    end if