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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
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
Thanks, I will try that.