随时可以
因该再程序的一开始open
应用结束时close,set cnn=nothing
因为只用一个连接就行了,其他都可以通过Rs,command...实现

解决方案 »

  1.   

    set rs=new adodb.recordset
    rs.open "select c from a where b='" & 你的变量 &"'",cnn
    msgbox (rs.fields(0))
    rs.close
    set rs=nothing
      

  2.   


    dim s as string
    s=a.fields("b").value
    MsgBox(prompt[, buttons] [, title] [, helpfile, context])
    将prompt替换成s
      

  3.   

    DIM rs as ADODB.Recordset
    ...set rs = cnn.execute ("select C from A where B='Test'")
    if not rs.eof then
      msgbox rs("C")
    end if
    rs.close
    set rs=nothing如果是很多用户共用远程数据库的话,尽量多CLOSE,OPEN
      

  4.   

    http://www.wzjcw.net/vbgood/taishan/index.html有几个代码可以参考
      

  5.   

    谢谢karma,但是为什么我只能打一个C字段
    我用movenext都没用?
      

  6.   

    if not rs.eof then
      do while not rs.eof
        msgbox rs("C")
        rs.movenext
      loop
    end if