Using ADOX to update a Property does not work.
I want to change the Access database for a linked table. My abridged code is:
Dim oCAT As ADOX.Catalog
oCAT = New ADOX.Catalog
oCAT.ActiveConnection = goConnection
Dim t As ADOX.Table
Dim p As ADOX.Property
For Each t In oCAT.Tables
If t.Type = "LINK" Then
t.Properties("Jet OLEDB:Link Datasource") = "C:\MyAccess.mdb"
End If
Next t
When I write the code in Access 2003, it works fine. When I write this code
in VB.NET, I get an error message for this line: 't.Properties(.....) =
"....."'
that says "Property Item is read-only". The line does not compile.
How can I change this property for a linked table from VB.NET??