Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
partenope
Partner - Creator II
Partner - Creator II

ODBC Connection with parametric Name in Qlik Sense

Hi,

I'm working on a migration from QlikView to Qlik Sense. My app has a cycle to read the same table from almost 300 different OLE DB connection (one for each customer) putting variable (for the current DB) directly in the connection string.

How can I implement the same loop using "LIB CONNECT" in Qlik Sense?

Thanks in advance!

Labels (5)
5 Replies
ArnadoSandoval
Specialist II
Specialist II

Hi @partenope 

Are you familiar or have you try ODBC example ?

Another article Connect 

Hope this helps,

Arnaldo Sandoval
A journey of a thousand miles begins with a single step.
javiersassen
Partner - Contributor III
Partner - Contributor III

Hi Partenope,

you can turn on Legacy mode. With this turned on, you can use other connection strings than just "LIB CONNECT TO" like the ones you used in Qlikview:

https://support.qlik.com/articles/000034992

partenope
Partner - Creator II
Partner - Creator II
Author

Hi Arnaldo,

In my script I need a Loop (or for cycle) to reach, at each step, different DB, like this:

FOR i = 0 TO (n - 1)

Let currentConnection = Peek('connection', $(i), 'TableConnections');

LIB CONNECT '$(currentConnection)'

Load * from Table;

DISCONNECT

NEXT

Then I need "n" ODBC connection, but I can't reach them with this sample script.

I need something like "URL is" for WebFiles...

Thanks!

partenope
Partner - Creator II
Partner - Creator II
Author

Hi Javier,

I know there is "legacy Mode", but I hope there is another way...
The Qlik Sense server has many other Apps and I don't think I will survive changing scripts in all of them! 🙂

Thanks!

javiersassen
Partner - Contributor III
Partner - Contributor III

I don't think there's another way to use parameters in connection strings other than with legacy mode.

when turning on legacy mode, your old connection string ("LIB CONNECT TO") will still work.