Solved

Multiple Access DBs in SQL Statement

Posted on 1998-07-29
3
164 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
  • 2
3 Comments
 
LVL 6

Expert Comment

by:anthonyc
Comment Utility
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
Comment Utility
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
Comment Utility
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
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…

771 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now