Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Choose connection string based on computer name

I have a connection string that works on one pc, but not on the other, and vice versa..

So two connection strings.

What I want to do is have an if satement that checks the computer name, and if its computer A, then use connection 1, else use connection 2.

How do I do this?

1 Reply
rbecher
MVP
MVP

Hi,

just do it like this:

if ComputerName() = 'COMPUTER_A' then

     CONNECT DB1....;

elseif ComputerName() = 'COMPUTER_B' then

     CONNECT DB2....;

else

     exit script;

end if

- Ralf

Astrato.io Head of R&D