Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Refresh Access links using ADOX

Status
Not open for further replies.

barstool

Programmer
Nov 11, 2003
1
US
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

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top