Results 1 to 3 of 3
  1. #1
    In_the_CLE is offline Novice
    Windows 10 Access 2016
    Join Date
    Mar 2019
    Posts
    2

    SQL join tables across multiple ADO Connections


    In VBA, I would like to perform an SQL join of tables from two different ADO Connections. Is this possible ? The syntax of the ADO Recordset Open method seems to suggest it works on just one Connection. But if there is some way to do this, I would be grateful if someone could post a sample. One connection might be to an Access database, another to SQL server, for example. Or Oracle. I can make the multiple connections inside the code. Just don't know how to join the tables into a single SQL query. I know a fallback could be to load the data into arrays and work with them that way, but if there is a way to join the tables, that would be great. Thank you for any suggestions you may have.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,523
    if you link the tables via odbc ,then you can just build a query and join them, since they appear as a table.

  3. #3
    In_the_CLE is offline Novice
    Windows 10 Access 2016
    Join Date
    Mar 2019
    Posts
    2
    Thanks, ranman256. I am trying to do this inside VBA, not in the Access GUI. I'm not sure how to do what you suggest inside VBA.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Connections between forms and tables
    By lqangel in forum Programming
    Replies: 4
    Last Post: 09-15-2015, 07:25 PM
  2. Replies: 1
    Last Post: 01-28-2013, 11:59 AM
  3. Join multiple tables to one
    By b6677862 in forum Queries
    Replies: 1
    Last Post: 02-08-2012, 06:59 AM
  4. Join for multiple tables?
    By Etownguy in forum Queries
    Replies: 3
    Last Post: 05-30-2011, 04:54 PM
  5. Error using left join accessing 2 active connections
    By peterg2000 in forum Programming
    Replies: 0
    Last Post: 10-05-2009, 05:04 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums