How to Link tables in ADO.NET

  • Thread starter Thread starter David
  • Start date Start date
D

David

I Know how to Link a Table from One Access database to
another using ADO and ADOX. Here is my ADO, ADOX vb6
source code:
-----------------------------------------------------
Set catLocal = New ADOX.Catalog
catLocal.ActiveConnection = cnnToLocalAccessMDB

Set tblRemote = New ADOX.Table
With tblRemote
Set .ParentCatalog = catLocal
.Name = strLocalTableName
.Properties.Item("Jet OLEDB:Create Link").Value = True
.Properties.Item("Jet OLEDB:Link Datasource").Value =
strRemotePathFileMDB
.Properties.Item("Jet OLEDB:Remote Table Name").Value =
strRemoteTableName
end With

catLocal.Tables.Append tblRemote
 
Hi David,

See the thread "relink access tables in vb.net code" started by cyrus on 2th
jan.
There is a good response from Paul Clement.
 
Thank you Miha;

This means that we still have to use the "old" ADO.dll's?
I had hoped for a class like solution 'System.Data...' in
dNET to elegantly help out...I heared ADO.NET is our
future...do I miss the point of moving to ADO.NET?

Thanks again for your speedy response.
David
 
Hi David,

I don't think that ado.net is supposed to replace ADOX.
Not yet, at least :)
 
¤ Thank you Miha;
¤
¤ This means that we still have to use the "old" ADO.dll's?
¤ I had hoped for a class like solution 'System.Data...' in
¤ dNET to elegantly help out...I heared ADO.NET is our
¤ future...do I miss the point of moving to ADO.NET?
¤
¤ Thanks again for your speedy response.
¤ David

There currently is no native support in ADO.NET for linking tables to an Access
database. Your current options are the COM based ADOX and DAO libraries.


Paul ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)
 
Back
Top