Solved

Multiple Access DBs in SQL Statement

Posted on 1998-07-29
3
176 Views
Last Modified: 2010-05-03
How do you specify multiple DBs in VB's Data-control-SQL(Recordsource property)?
Im using vb5.0

(I need to match entries from 2 different .mdb files using a sql statement in the data-control.)
0
Comment
Question by:Deep Diver
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 6

Expert Comment

by:anthonyc
ID: 1467058
From table1's database, use this query.

select table1.*, table2.*
  from table1 inner join table2 in "c:\path\to\other\mdb.mdb"
    on table1.column1 = table2.column1
0
 

Author Comment

by:Deep Diver
ID: 1467059
This might work in some cases anthony, but the only column in table 1 corresponding to a column in table 2, in my case, does not always have matching entries. This is the whole problem. I want to find out (with SQL) wich entries does have matching entries and wich not.

sorry, but the answer is not that simple...
0
 
LVL 6

Accepted Solution

by:
anthonyc earned 100 total points
ID: 1467060
yes, the answer >IS< that simple.  Please try something before you bash it.

select table1.*, table2.*
  from table1 left join table2 in "c:\path\to\other\mdb.mdb"
    on table1.column1 = table2.column1
 where isnull(table2.column1)

will return all records that are in table1 and NOT in table 2.

0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question