Hi,

I'm having problems with VB 6.0 data Environment. Is there a way to link two connections? Example, I have two vfp database files in different location; I created two connections with commands (query strings). In SQL, I'm trying to link these two by using union join. Is there a way to do this?

Thanks in advance for your help.
Raj.

Hi,

You can do that, for that, open Connection to any one database, and access the table of second database through that conn..
I will give you example of access:

Say you have opened connection for c:\db1.mdb
and you want to link from a table from c:\db2.mdb..
you can use this query:

Select * from Tab1 Where ID In (Select ID From [c:\db2.mdb].Tab2)

OR

Select * from Tab1 Where ID In (Select ID From `c:\db2.mdb`.Tab2)

Same should work for vfp databases as well..

Regards
Veena