JOIN on tables from different Access databases


I try to create a Query using a JOIN statement on tables coming from
two different Access databases. It works within Access where I create
links on the two databases/tables, but how do I obtain the same from
Delphi (6) - without creating an alias?

I've got two (huge and dayly updated) Databases, say A.mdb and B.mdb
one containing the table "Calculated" while the other one holds
"Measured". Both tables have a field "SampleNo". So what I'm doing is
to create links on the two tables and perform our queries in the form

SELECT Calculated.SampleNo, Calculated.x, Measured.x
FROM Calculated JOIN Measured ON (Calculated.SampleNo =

as Access creates them when you use the edit view and connect the two
tables on the SampleNo fields.

Now I want to do the same using Delphi. I've no problems opening,
viewing the tables on their own or to do queries on them. But I can
only access the ADOTable, the ADOQuery is connected to. I have found
out, that you can use give the path and database name in the
SQL-clausel when you use the (BDE) TQuery object - but not on
Access-databases. Another way is to use the BDE TDatabase and open the
database via the MSACCESS-Driver while passing the table name within
the Param-String. You can give the table an unique Tablename, which
you can handle like an alias in the TQuery but again not with Access
Databases (Error:11962) ...

So has anyone a solution? As this should be a quite common problem I
think that Borland has thought of it and I just haven't thought the
right way yet.

Thank's for your help,