Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Connections to multiple data bases and Include scripts

Can you please let me know how to connect to multiple data bases in Qlikview . Will it work and please share the connections for syntax for connections and storing these connections externally in include scripts.

Awaiting response as soon as possible.

Thank you in advance.

3 Replies
vishsaggi
Champion III
Champion III

If i get you correctly and i assume you already have the connection strings in your text files.

This is what i did.

Con1.txt

Con2.txt

Con3.txt

Are my three different data source connections files which has my connection strings. So in QV script i did this

LET v1ConnectionPath = '$(Must_Include=\\servername\Qlikview\Reports\Scripts\Con1.txt)';

LET v2ConnectionPath = '$(Must_Include=\\servername\Qlikview\Reports\Scripts\Con2.txt)';

LET v3ConnectionPath = '$(Must_Include=\\servername\Qlikview\Reports\Scripts\Con3.txt)';


Then using these variables i called where ever i required. Like



$(v1ConnectionPath);


My load script here.


$(v2ConnectionPath);


My 2nd Load script here. .....etc.


Hope this helps.

Anonymous
Not applicable
Author

Hi Vishwanath,

Thank you for your message .

1. Can the connection strings be stored as it is in the text files. I.e. as it is generated in the qlikview script editor when we try to make the connection to the particular data base. No special syntax required in text file correct? just the string.


2. If we connect to multiple data bases will Qlikview function properly allowing fields from tables from both data bases or would there be any problem of loss of connection or (dealing with one database) at a time? As I might have 4 to 5 different data sources.

vishsaggi
Champion III
Champion III

1. Can the connection strings be stored as it is in the text files. I.e. as it is generated in the qlikview script editor when we try to make the connection to the particular data base. No special syntax required in text file correct? just the string.


Just use the connection string as when you add to Qlikview script. It would work fine.


2. If we connect to multiple data bases will Qlikview function properly allowing fields from tables from both data bases or would there be any problem of loss of connection or (dealing with one database) at a time? As I might have 4 to 5 different data sources.


I too have data coming from 4 different sources so i use these variable where ever necessary to pull data from different db's it does not effect other db connections.