I have 2 database:
Database 1 contains a table "Orders" that includes the string field "Supplier_Code"
Database 2 contains a table "Suppliers" that includes the string field
"Code", and boolean field "IsValid"
I want an SQL ststement to retreive orders on valid suppliers only.
If both tables were in the same database, my statement would be something like:
"Select * from Orders where ....... inner join Suppliers on
Orders.Supplier_Code = Suppliers.Code where Suppliers.IsValid<>0 order
by Supplier_Code"
However, I need a statement that allows for the tables being in
different databases.
The databases will be either MS Access, MS Sql Server, MySQL or MSDE,
and will both be the same type.
I do have variables storing the connection strings to each database
("cStr1" and "cStr2") and also ADODB connection variables ("con1" and
"con2").
The application is written in VB6 using ADO. |