如何合并并显示呢,以下只是连一个的,如果连两个再合并,如何做呢,能不能把以下代码修改一下,或者如何连接服务器呢 Dim cnnStr As String, SQL As String Dim mydata As String Dim rs As New ADODB.Recordset mydata = "印字内容查询表SQL" cnnStr = "Provider=SQLOLEDB.1;" _ & "User ID=sa;pwd=111111;" _ & "Data Source=server02;" _ & "Initial Catalog=" & mydata Set cnn = New ADODB.Connection cnn.ConnectionString = cnnStr cnn.OpenSQL = "lianjie" Set rscc = New ADODB.Recordset rscc.Open SQL, cnn, adOpenKeyset, adLockOptimistic
sp_addlinkedserver
sp_addlinkedsrvlogin
Dim cnnStr As String, SQL As String
Dim mydata As String
Dim rs As New ADODB.Recordset
mydata = "印字内容查询表SQL"
cnnStr = "Provider=SQLOLEDB.1;" _
& "User ID=sa;pwd=111111;" _
& "Data Source=server02;" _
& "Initial Catalog=" & mydata
Set cnn = New ADODB.Connection
cnn.ConnectionString = cnnStr
cnn.OpenSQL = "lianjie"
Set rscc = New ADODB.Recordset
rscc.Open SQL, cnn, adOpenKeyset, adLockOptimistic