可以
========================================================帮忙测试一下www.easthot.net的论坛,把bug写到<BUG报到处>这个帖子
谢谢大家。
这个论坛也是解决编程方面的技术问题,欢迎大家来来看看,
这里或许也有你要的答案!
========================================================
可取如下帖子领分http://www.csdn.net/expert/topic/674/674492.xml?temp=.2050592
http://www.csdn.net/expert/topic/641/641938.xml?temp=.5480768
http://www.csdn.net/expert/topic/675/675554.xml?temp=.5095026

解决方案 »

  1.   

    dim cnstr as string  cnstr = "Provider = SQLOLEDB.1;Password=" + youpasd + ";Persist Security Info=True;User ID=sa;Initial Catalog=" + youdb + ";Data Data Source=" + youserver + ";"  
     用 adodc1:
      With adodc1
           .connectionstring = cnstr
           .username = "sa"
           .Password = youpasd 
           .RecordSource = yousql
           .Refresh
         End With或者用ADODB:
        Dim cnn1 As ADODB.Connection
        Dim rst1 As ADODB.Recordset
        Set cnn1 = New ADODB.Connection
        Call cnn1.Open(cnstr)
        Set rst1 = New ADODB.Recordset
        rst1.ActiveConnection = cnn1
        On Error GoTo errorhandle
        Call rst1.Open(yousql, cnn1, adOpenKeyset, adLockReadOnly)