Hi, I am trying to refresh links in an Access 2000 db to an Access 2000 backend. I keep getting the dreaded "Multiple step OLE DB operation generated errors. Check each aOLE DB status value, if available. No work was done." error. Here is the code. Any ideas/suggestions would be greatly appreciated.
****************
Dim lsDbLinkFrom As String
Dim lsdbLinkSource As String
lsDbLinkFrom = "...Path\frontend.mdb"
lsdbLinkSource = "path\backend_be.mdb"
Dim catDB As ADOX.Catalog
Dim tbllink As ADOX.Table
Dim cnn As Connection
Set catDB = New ADOX.Catalog
' catDB.ActiveConnection = "Provider=Microsoft.jet.oledb.4.0;" & _
"Data Source=" & lsDbLinkFrom
For Each tbllink In catDB.Tables
If tbllink.Type = "LINK" Then
tbllink.Properties("Jet OLEDB:Link Datasource" = lsdbLinkSource
tbllink.Properties("Jet OLEDB:Create Link" = True
End If
Next
' catDB = Nothing
*****************************
Note, catDB = Nothing is commented out because it generated an error on compile. Thanks in advance for any help.
Cheers
****************
Dim lsDbLinkFrom As String
Dim lsdbLinkSource As String
lsDbLinkFrom = "...Path\frontend.mdb"
lsdbLinkSource = "path\backend_be.mdb"
Dim catDB As ADOX.Catalog
Dim tbllink As ADOX.Table
Dim cnn As Connection
Set catDB = New ADOX.Catalog
' catDB.ActiveConnection = "Provider=Microsoft.jet.oledb.4.0;" & _
"Data Source=" & lsDbLinkFrom
For Each tbllink In catDB.Tables
If tbllink.Type = "LINK" Then
tbllink.Properties("Jet OLEDB:Link Datasource" = lsdbLinkSource
tbllink.Properties("Jet OLEDB:Create Link" = True
End If
Next
' catDB = Nothing
*****************************
Note, catDB = Nothing is commented out because it generated an error on compile. Thanks in advance for any help.
Cheers