Help ADOX for ReLinking Dbase Table in Access

Help ADOX for ReLinking Dbase Table in Access

Post by Tony Upchurc » Fri, 05 Oct 2001 04:52:12



I am trying to relink a dbase table that is in my access database
with the code below.  I am getting an error at the line:

tblLink.Properties("Jet OLEDB:Create Link") = True

thats says...

[Multiple-step OLE DB operation generated errors.  Check each
OLE DB status value, if available.  No work was done.]

Can anyone help me with this?

---------------------------------------------------

Private Sub RefreshLinks()

   Dim catDB As ADOX.Catalog
   Dim tblLink As ADOX.Table

   Set catDB = New ADOX.Catalog
   ' Open a Catalog on the database in which to create the link.
   catDB.ActiveConnection = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="
_
               & App.Path & "\..\onestaff.mdb;Persist Security Info=False"

   For Each tblLink In catDB.Tables
      ' Check to make sure table is a linked table.
      If tblLink.Type = "LINK" Then

         If tblLink.Name = "EMPUHS" Then
            tblLink.Properties("Jet OLEDB:Link Datasource") = App.Path
            tblLink.Properties("Jet OLEDB:Create Link") = True
         End If

      End If
   Next

   Set catDB = Nothing

End Sub

 
 
 

1. ADO Ext for ReLinking Dbase Table

I am trying to relink a dbase table that is in my access database
with the code below.  I am getting an error at the line:

tblLink.Properties("Jet OLEDB:Create Link") = True

thats says...

[Multiple-step OLE DB operation generated errors.  Check each
OLE DB status value, if available.  No work was done.]

Can anyone help me with this?

---------------------------------------------------

Private Sub RefreshLinks()

   Dim catDB As ADOX.Catalog
   Dim tblLink As ADOX.Table

   Set catDB = New ADOX.Catalog
   ' Open a Catalog on the database in which to create the link.
   catDB.ActiveConnection = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="
_
               & App.Path & "\..\onestaff.mdb;Persist Security Info=False"

   For Each tblLink In catDB.Tables
      ' Check to make sure table is a linked table.
      If tblLink.Type = "LINK" Then

         If tblLink.Name = "EMPUHS" Then
            tblLink.Properties("Jet OLEDB:Link Datasource") = App.Path
            tblLink.Properties("Jet OLEDB:Create Link") = True
         End If

      End If
   Next

   Set catDB = Nothing

End Sub

2. case order by

3. Relinking Access 97 tables using ADO...

4. Replication and the UNC Directory

5. Relinking Access 97 tables using ADO

6. DB Grid and ADODB control

7. Problem relinking access tables to SQL Server using SQL ODBC driver 3.6x

8. Message Dialog Box

9. Relinking tables in Access with ADO

10. relink tables using ADO objects ,Access 2000 version

11. Getting SQL Server to write to a dbase linked access table or communicate with dbase directly

12. Accessing Paradox or dBase tables from C++ HELP!

13. Help!. Getting Pdox message when accessing dbase tables