|
-
May 1st, 2009, 09:45 AM
#1
Thread Starter
PowerPoster
create 1 query from two databases
with VB6 (ado) + Access03;
-------------------------
how can i generate a query using two tables from two different data bases ( one is .mde and another .mdb)
(1) i opened the connection and recordsets of the both the
data bases
(2) confusion from here on wards
i want to inner join the .mde1 table with .mdb2 table
and extract some sorted records
any advice please.
-
May 1st, 2009, 11:44 AM
#2
Re: create 1 query from two databases
Two different connections are no good - because queries run against just one connection.
What recordset(s) you have open already are irrelevant, as they cannot be used as the source for more queries.
There are two ways I can think of to do what you want.
The first is to open one of the databases and add Linked Tables, which allow you to treat the tables of the other database as if they are in the same database (and you get to choose what to call them).
The other is to use an SQL statement that includes information to link to the other database. There is info about doing that for Access in the "SQL" section of our Database Development FAQs/Tutorials (at the top of this forum)
-
May 1st, 2009, 11:10 PM
#3
Thread Starter
PowerPoster
Re: create 1 query from two databases
excuse me please for missing info;
my data bases are on two computers connected via LAN.
sql2000 is running on one system;
.....................
the .mde database is in a shared folder
(a) i am failed to connect to .mde file on server machine ( LAN )kindly tell me the connection string
(b) how to link the tables using ADO. and more over other
data base is a .mde file
-
May 3rd, 2009, 07:21 AM
#4
Re: create 1 query from two databases
a) See the "connection strings" link in my signature, they should have what you need.
b) You don't, you use one of the options I mentioned before (in Access set up linked tables, or do the linking inside your SQL statements).
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|