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: 
Not applicable

Changing the ODBC Connection From Dev to Prod

Hi All,

I'm new to Qlikview.How can i change the source ODBC Connection from Dev to Prod.I dont want to do it manually all the time in all QVW's.Is there any way to do it ?

2 Replies
dcheung3388
Partner - Contributor III
Partner - Contributor III

Hi,

I would suggest that you put your connection string inside a dbconnection string text file, then within your QVW load script like below..

// Connection String text file.

$(Include=..\[path name]\dbconnect45.txt);


Then all you need to do is use the same file for dev and production, but on your production machine, have the production connection string.


Hope this helps.


David

sudeepkm
Specialist III
Specialist III

Assume that you have the same folder structure on your DEV and PROD environment but on two different machines with different host names.

You can create a variable in Script such as

let vpath=GetFolderPath('..\Application');

let vEnv = if('$(vpath)'='prod.domain.com','PROD','DEV');

now based on the value of vEnv you can use the connection string for respective environment.