Menu

How to access multiple databases without (presumably) having IN available

Help
M S
2018-04-09
2018-04-16
  • M S

    M S - 2018-04-09

    Just downloaded ucanaccess so a machine without MSAccess.exe can run queries on .mdb files.
    Basically I'm joining tables from databases A and B, and putting the results in database C. I understand I cannot run a VBA macro inside the mdb file.

    With Access, the queries were embedded within the .mdb file in a macro and used "IN" to refer to external databases. For example, here is a snippet subsearch from a query before doing the join:

    (SELECT * FROM [tablename] IN 'K:\public\remote\folder\myDB.mdb') AS MyAlias

    How do I do something similar with ucanaccess if there is no MSAccess executable to execute the "IN" keyword? I'm looking for high level guidance here, not necessarily code, as I'm not very familiar with the API yet.

    thanks

     
  • Gord Thompson

    Gord Thompson - 2018-04-12

    You could create a temporary database with links to the relevant tables in databases A, B, and C, and then modify the existing queries to use those linked tables and avoid the IN clause. Sample code for creating the temporary database with table links can be found in the GitHub gist here.

     

    Last edit: Gord Thompson 2018-05-03
  • M S

    M S - 2018-04-16

    Thanks, I will try that.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.