Join 2 tables from 2 different databases

aomi2005

New member
Joined
May 22, 2012
Messages
1
Programming Experience
Beginner
I am tying to build a COMMAND that joins two tables from two different access databases in vb.net, can anyone give me full example.
I'm trying to write an SQL query which would include an INNER/OUTER JOIN statement
 
You will need to use the OPENDATASOURCE statement, like so:

SELECT * FROM OPENDATASOURCE(<PROVIDER>, <CONNECTIONSTRING>).<DBNAME>.<TABLENAME>


You can find more information on the syntax and examples from MSDN. Note that although this works for SQL databases, I have never tried it with Access databases.
 
Back
Top