Vous cassez plus j'ai la solution mais comme j'ai perdu 1/2 journée pour trouver ça peut toujours servir à quelqu'un !
Fonctionne en ADO !
1°) Il faut dans votre projet ajouter "Microsoft ADO Ext. 2.8 for DLL and Security" ( c'est msadox.dll )
2°) Pour la connexion ne pas utiliser "driver={Microsoft Access Driver (*.mdb)};DBQ=mabase.mdb" MAIS
"Provider=Microsoft.Jet.OLEDB.4.0; Data Source=mabase.mdb;Jet OLEDB:Engine Type=5;"
3°) Utiliser le code suivant :
Dim rep as String
Dim adoCat As New ADOX.Catalog
Dim adoTable As New ADOX.Table
Set adoCat.ActiveConnection = MaConnection
Set adoTable.ParentCatalog = adoCat
For Each adoTable In adoCat.Tables
If adoTable.Type = "LINK" Then
Select Case adoTable.Name
Case "Articles":
Rep = App.Path & "\Articles.mdb"
Case "Familles":
Rep = App.Path & "\Familles.mdb"
End Select
adoTable.Properties("Jet OLEDB:Link Datasource") = Rep
End If
Next
Et ça fonctionne super bien !
GrosLolo
