Hi, does anyone know much about using Aliases in pass through queries to get member data from DB2?
I have a query that does the pass through, which when it runs, asks which ODBC source to connect to.
This works and I can then create a linked table to the alias
Pass through query:
Create or replace alias LibrarytoCreateAliasIn."Alias Name" FOR LibraryofSourceTable.SourceTableName(Member)
I can currently do this all manually, via queries in MS Access, but would love to be able to automate it.
If possible, can anyone point me in the right direction to programmatically create the alias via VBA, passing in strings with the correct library, table names and members, automatically link to the correct ODBC, get the data, do what I need to do with the data, then drop the alias.
On my first go I could link to the ODBC, and make the connection, but I could not get the above pass through query to run.
Has anyone successfully done this with aliases and DB2 member data before? Can anyone help?
Cheers Ziffer68
I have a query that does the pass through, which when it runs, asks which ODBC source to connect to.
This works and I can then create a linked table to the alias
Pass through query:
Create or replace alias LibrarytoCreateAliasIn."Alias Name" FOR LibraryofSourceTable.SourceTableName(Member)
I can currently do this all manually, via queries in MS Access, but would love to be able to automate it.
If possible, can anyone point me in the right direction to programmatically create the alias via VBA, passing in strings with the correct library, table names and members, automatically link to the correct ODBC, get the data, do what I need to do with the data, then drop the alias.
On my first go I could link to the ODBC, and make the connection, but I could not get the above pass through query to run.
Has anyone successfully done this with aliases and DB2 member data before? Can anyone help?
Cheers Ziffer68