在VC中如何实现将多个数据源中的数据放到一个记录集中,不是多个表,即多个MDB文件
下面这段代码就是实现这个功能,但是VB的,哪位能帮忙转成VC呀,或者能给段实现此功能的代码更好Dim adoConnection As New ADODB.Connection
Dim adoCatalog As New ADOX.Catalog
Dim adoTable As New ADOX.Table
Dim i As Integer
Dim bfind As Boolean
Dim TTable1 As String
If bAdd1 Then
   TTable1 = TTable & "1"
Else
   TTable1 = TTable
End If
'adoConnection.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & sSourceDBPath & ";Mode=ReadWrite;Persist Security Info=False;Jet OLEDB atabase Password="& MdbPassSet adoCatalog.ActiveConnection = adoConnection
For i = adoCatalog.Tables.Count To 1 Step -1
    If adoCatalog.Tables.Item(i - 1).Type = "LINK" And UCase(TTable1) = UCase(adoCatalog.Tables.Item(i - 1).Name) Then
       adoCatalog.Tables.Delete adoCatalog.Tables.Item(i - 1).Name
       Exit For
    End If
Next i
adoCatalog.Tables.Refresh
Set adoTable.ParentCatalog = adoCatalog
'adotable.P
Set adoTable.ParentCatalog = adoCatalog
'adotable.Properties.Item("Jet OLEDB:Link Datasource").value = sTargetDBPath
adoTable.Properties.Item("Jet OLEDB:Link Datasource").Value = sSourceDBPath
adoTable.Properties.Item("Jet OLEDB:Remote Table Name").Value = TTable
adoTable.Properties.Item("Jet OLEDB:Create Link").Value = True
adoTable.Properties.Item("Jet OLEDB:Link Provider String").Value = "MS Access;Pwd=" & MdbPass
adoTable.Name = TTable1
i = 0
Head:
adoCatalog.Tables.Append adoTable