ADO - Getting data from two databases

Using ADO I have established connection with NorthWinds database in MS-SQL Server. Without connecting again is there any way to access a table in pubs database using the SQL SELECT Statement.
LVL 1
sivaramyAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
gwambConnect With a Mentor Commented:
HTH:

Select *
from NORTHWIND.[tableowner1].Table1 t1
inner join PUBS.[tableowner2].Table2 t2 on t1.PK = t2.PK

if u are dbo and [tableowner] is dbo to, u cen use this

Select *
from NORTHWIND..Table1 t1
inner join PUBS..Table2 t2 on t1.PK = t2.PK
0
 
vbyuvalCommented:
   
0
 
tommy_boyCommented:
Hmm.. I am not sure if that will work...
I believe you connect A Database.  Ie 1 at a time.
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
sivaramyAuthor Commented:
gwamb comment is working.

tommy_boy
If you are not sure never lock a question.

Please have a look at the previous ee news letter.
0
 
sivaramyAuthor Commented:
Thank you very much gwamb.

If you can please let me know one more thing.

Will the same technique work with Oracle databases as well?
0
 
gwambCommented:
I don't know, but this is ANSI SQL, so I hope it will work with Oracle.

0
All Courses

From novice to tech pro — start learning today.