Wondering if there's a way to use a parameter to define the ODBC Data source. I want to connect via CData's ODBC driver for Xero. This provides access to multiple tables via SQL statements. I have parameters for the ConnectionString, and the SQL filters. The SQL filter works fine, but if I swap in a parameter for the COnnectionString it reads the parameter reference as the ConnectionString and throws an error.
= Odbc.Query("dsn=BFA Sys", "Select * from TrialBalance where date=[PeriodEnding]")
would like it to be:
= Odbc.Query("dsn=[Connection]", "Select * from TrialBalance where date=[PeriodEnding]")
where [Connection] is a parameter returning the connection source, but this gives an error saying [Connection] is not a valid source.