Re: Query Two Databases
- From: "ekkehard.horner" <ekkehard.horner@xxxxxxxx>
- Date: Tue, 27 Dec 2005 17:34:52 +0100
JSzabo wrote:
Hi,
I am (still) developing with VB 6.0 and MS Access 2000 on Win98-R2.
Is it possible to easily/reliably query two tables that each exist in a different database, then return the results in a single recordset? Or must I create a linked-table reference in one of the databases? Or must I do something else … ?
[...] Using 2 copies of nordwind.mdb (c:\temp\nordwind1.mdb, c:\temp\nordwind2.mdb) the statement
select B.[Bestell-Nr]
, B.[Kunden-Code]
, K.[Kunden-Code]
, K.[Firma]
from Kunden as K
, Bestellungen as B in "c:\temp\nordwind2.mdb"
where B.[Kunden-Code] = K.[Kunden-Code]works (for me) as expected when executed from a oledb/jet connection to c:\temp\nordwind1.mdb. I admit, the syntax of a IN-clause is hard to get right (I had to experiment a bit), so YMMV. .
- Prev by Date: Re: INSERT row into Access
- Next by Date: Unexpected deadlocks! why ?
- Previous by thread: Re: Sorting ADO recordset on a nameless field..?
- Next by thread: Re: Query Two Databases
- Index(es):