Querying data in multiple VFP databases

The following SQL runs in VFP accessing tables in two database containers
system! and client1!.
I attempted to use two ADO connections in Delphi 5 (using ADO Express) using
the respective names as the VFP DBC's.

The following results:  Every other time I activate the query I get an error
message.  The times that do not produce an error
message the query executes and products the correct results.  The error
message always relates to the first outer join.
The error message states that the 'Column "INTAKE_AA" is not found.  If I
rearrange the outer joins (for example I place the
line joining on Facility.code = patient.code_location ) I get the error
message stating that the 'Column "CODE_LOCATION"
is not found.

Any ideas? TYIA

Robert Baker

select first_name, last_name, patient.address as paddr1,
patient.address_2 as paddr2,
rtrim(patient.city) + ', ' + patient.state + '   ' + patient.zip_code as
paddr3,
employer, intake_claimno, dapptdate, nstarttime,
facility.address as faddr1,
Facility.Suite as faddr2,rtrim(Facility.city)+ facility.state + '  ' +
facility.zip_code as faddr3,
facility.phone as fphone, substr(cappnotes,4,20) as cnote,
Source1.Name_Company as intakeaa,  Source2.Name_Company as intakeda,
Carrier.Name_company as primarycarrier,
patient.code_location
from client1!patient, client1!appoint
left outer join system!source Source1 on Source1.code = patient.intake_aa
left outer join system!source Source2 on Source2.code = patient.intake_da
left outer join system!Carrier on carrier.code =
patient.code_primary_carrier
left outer join system!Facility on Facility.code = patient.code_location
where patient.accountnum = appoint.accountnum and
upper(left(appoint.cappnotes,3)) ='1ST'