很急的问题?请问在VB里,如何才能真正关闭一个数据库的连接?

解决方案 »

  1.   

    Adodc1.close
    set Adodc1 = nothing
      

  2.   

    rs.Close
    cn.Close
    Set rs = Nothing
    Set cn = Nothing
      

  3.   


    Rs.Close
    Cn.Close
    Set Rs = Nothing
    Set Cn = Nothing
      

  4.   

    Cn.Close
    Set cn = Nothing
      

  5.   

    rs.Close
    cn.Close
    Set rs = Nothing
    Set cn = Nothing
      

  6.   


    Rs.Close
    Cn.Close
    Set Rs = Nothing
    Set Cn = Nothing就这样就能关闭了!!!
      

  7.   

    Rs.Close
    Cn.Close
    Set Rs = Nothing
    Set Cn = Nothing
      

  8.   

    if conn.state=1 then conn.close      
    set conn=nothing