access中链接表的问题(3)
strTargetDB(i) = CurrentProject.Path & "/" & strTargetDB(i)
i = i + 1
End If
End If
Next
j = i - 1
For i = 1 To j
catDB.Tables.Delete strLinkTblName(i)
Set tblLink = New ADOX.Table
With tblLink
.Name = strLinkTblName(i)
Set .ParentCatalog = catDB
.Properties("Jet OLEDB:Create Link") = True
.Properties("Jet OLEDB:Link Datasource") = strTargetDB(i)
.Properties("Jet OLEDB:Link Provider String") = strProviderString(i)
.Properties("Jet OLEDB:Remote Table Name") = strSourceTbl(i)
内容版权声明:除非注明,否则皆为本站原创文章。