<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Differenct connection strings in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Differenct-connection-strings/m-p/914088#M317061</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The way I have done in this in the past is each include file contains the connection string for the environment you are in.&amp;nbsp; When the qvw is moved to a different environment, the include file in that environment would have a different string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;example - you have an include file called connection.qvs.&amp;nbsp; The file contains the connection string - you would have 2 versions of this file - one in test, one in production.&lt;/P&gt;&lt;P&gt;When your qvw is in dev, when it includes the file in that environment, it contains the connection string for dev, when it runs in prodction, the connection string is in production.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This does make the assumption that your environments and folder structures are the same across environments&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 24 Jul 2015 13:14:56 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-07-24T13:14:56Z</dc:date>
    <item>
      <title>Differenct connection strings</title>
      <link>https://community.qlik.com/t5/QlikView/Differenct-connection-strings/m-p/914084#M317057</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used include file for connection strings.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But my question is, I have different connection strings of different environments, how do I call them intelligently?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2015 11:47:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Differenct-connection-strings/m-p/914084#M317057</guid>
      <dc:creator>kmswetha</dc:creator>
      <dc:date>2015-07-24T11:47:17Z</dc:date>
    </item>
    <item>
      <title>Re: Differenct connection strings</title>
      <link>https://community.qlik.com/t5/QlikView/Differenct-connection-strings/m-p/914085#M317058</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If&amp;nbsp; &lt;STRONG&gt;computername()&lt;/STRONG&gt;= 'Machine1'&amp;nbsp; Then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ....this connection string&lt;/P&gt;&lt;P&gt;ElseIf Computername() = 'Machine2'&amp;nbsp; Then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...that connection string&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...&lt;/P&gt;&lt;P&gt;Endif&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;EndIf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2015 11:58:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Differenct-connection-strings/m-p/914085#M317058</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2015-07-24T11:58:06Z</dc:date>
    </item>
    <item>
      <title>Re: Differenct connection strings</title>
      <link>https://community.qlik.com/t5/QlikView/Differenct-connection-strings/m-p/914086#M317059</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Another example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If WildMatch(vEnv, 'DEV') Then&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; OLEDB CONNECT TO [Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=*****; Data Source=****\****_DEV];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ElseIf WildMatch(vEnv, 'UAT') Then&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; OLEDB CONNECT TO [Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=*******; Data Source=****\****_UAT];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ElseIf WildMatch(vEnv, 'PROD') Then&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; OLEDB CONNECT TO [Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=*****; Data Source=*****\****_LIVE];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;End If &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2015 12:23:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Differenct-connection-strings/m-p/914086#M317059</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2015-07-24T12:23:53Z</dc:date>
    </item>
    <item>
      <title>Re: Differenct connection strings</title>
      <link>https://community.qlik.com/t5/QlikView/Differenct-connection-strings/m-p/914087#M317060</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi jonathan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But how do you assign value for vEnv?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2015 13:01:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Differenct-connection-strings/m-p/914087#M317060</guid>
      <dc:creator>kmswetha</dc:creator>
      <dc:date>2015-07-24T13:01:29Z</dc:date>
    </item>
    <item>
      <title>Re: Differenct connection strings</title>
      <link>https://community.qlik.com/t5/QlikView/Differenct-connection-strings/m-p/914088#M317061</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The way I have done in this in the past is each include file contains the connection string for the environment you are in.&amp;nbsp; When the qvw is moved to a different environment, the include file in that environment would have a different string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;example - you have an include file called connection.qvs.&amp;nbsp; The file contains the connection string - you would have 2 versions of this file - one in test, one in production.&lt;/P&gt;&lt;P&gt;When your qvw is in dev, when it includes the file in that environment, it contains the connection string for dev, when it runs in prodction, the connection string is in production.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This does make the assumption that your environments and folder structures are the same across environments&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2015 13:14:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Differenct-connection-strings/m-p/914088#M317061</guid>
      <dc:creator />
      <dc:date>2015-07-24T13:14:56Z</dc:date>
    </item>
    <item>
      <title>Re: Differenct connection strings</title>
      <link>https://community.qlik.com/t5/QlikView/Differenct-connection-strings/m-p/914089#M317062</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Adam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Am confused, if I have 2 environments, are you telling to use 2 different files?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2015 13:29:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Differenct-connection-strings/m-p/914089#M317062</guid>
      <dc:creator>kmswetha</dc:creator>
      <dc:date>2015-07-24T13:29:41Z</dc:date>
    </item>
    <item>
      <title>Re: Differenct connection strings</title>
      <link>https://community.qlik.com/t5/QlikView/Differenct-connection-strings/m-p/914090#M317063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;basically yes - the file has the exact same name in both environments, the connection string is different - when the file gets included, it will use the one based in the environment you are in containing the appropriate string&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2015 13:31:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Differenct-connection-strings/m-p/914090#M317063</guid>
      <dc:creator />
      <dc:date>2015-07-24T13:31:15Z</dc:date>
    </item>
    <item>
      <title>Re: Differenct connection strings</title>
      <link>https://community.qlik.com/t5/QlikView/Differenct-connection-strings/m-p/914091#M317064</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Which means, You are changing the connection string based on the environment manually?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2015 13:33:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Differenct-connection-strings/m-p/914091#M317064</guid>
      <dc:creator>kmswetha</dc:creator>
      <dc:date>2015-07-24T13:33:58Z</dc:date>
    </item>
    <item>
      <title>Re: Differenct connection strings</title>
      <link>https://community.qlik.com/t5/QlikView/Differenct-connection-strings/m-p/914092#M317065</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;no the connection string is in the include file.&amp;nbsp; Each include file, which has the same physical name has a differnt connection string.&amp;nbsp; When you load the application and it includes the file, it will read in the file based on the environment you are in, there bringing in the connection string from that file&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2015 13:36:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Differenct-connection-strings/m-p/914092#M317065</guid>
      <dc:creator />
      <dc:date>2015-07-24T13:36:37Z</dc:date>
    </item>
    <item>
      <title>Re: Differenct connection strings</title>
      <link>https://community.qlik.com/t5/QlikView/Differenct-connection-strings/m-p/914093#M317066</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oh I got it. So you create 2 files with same name but different connection strings.&lt;/P&gt;&lt;P&gt;It would pick up which ever it connects?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2015 13:42:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Differenct-connection-strings/m-p/914093#M317066</guid>
      <dc:creator>kmswetha</dc:creator>
      <dc:date>2015-07-24T13:42:55Z</dc:date>
    </item>
    <item>
      <title>Re: Differenct connection strings</title>
      <link>https://community.qlik.com/t5/QlikView/Differenct-connection-strings/m-p/914094#M317067</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;correct&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;place each include file in each environment - since they ahve the same name, there are no coding changes required this way when moving from one environment to another&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2015 13:45:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Differenct-connection-strings/m-p/914094#M317067</guid>
      <dc:creator />
      <dc:date>2015-07-24T13:45:18Z</dc:date>
    </item>
    <item>
      <title>Re: Differenct connection strings</title>
      <link>https://community.qlik.com/t5/QlikView/Differenct-connection-strings/m-p/914095#M317068</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The best way I have done is by having an Excel file with the connection strings in them. You will have to set up the ODBC connections or the the type of connection you are making. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my data extraction script I&amp;nbsp; load the Excel file and loop through the connections to load the data. This is under the assumption that your data structure in each environment is the same as any changes or additional tables which do not exist in any other environments will throw an error. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To identify which table belongs to which environment, you can create a variable after declaring the while loop which will be the name of your environment. You can add this as a additional column in each of your tables in your structure. This will simply be the variable of the environment. This is will make it easy for identifying environment table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2015 13:57:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Differenct-connection-strings/m-p/914095#M317068</guid>
      <dc:creator />
      <dc:date>2015-07-24T13:57:14Z</dc:date>
    </item>
    <item>
      <title>Re: Differenct connection strings</title>
      <link>https://community.qlik.com/t5/QlikView/Differenct-connection-strings/m-p/914096#M317069</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;Do you have one QV-extraction-application that needs to loop through all the connection-strings to load tables from different machines?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I usually do that by loading the machines/table-combinations from an excel-file and keeping the Connect-Strings in textfiles matching the machine-names, so that I only have to loop through the combinations:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" height="120" style="height: 94px; width: 197px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD height="20" width="80"&gt;Machine&lt;/TD&gt;&lt;TD width="80"&gt;Table&lt;/TD&gt;&lt;TD width="80"&gt;Load&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;machine1&lt;/TD&gt;&lt;TD&gt;table1&lt;/TD&gt;&lt;TD align="right"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;machine1&lt;/TD&gt;&lt;TD&gt;table2&lt;/TD&gt;&lt;TD align="right"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;machine2&lt;/TD&gt;&lt;TD&gt;table1&lt;/TD&gt;&lt;TD align="right"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;machine2&lt;/TD&gt;&lt;TD&gt;table3&lt;/TD&gt;&lt;TD align="right"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt; Load the machines where Load = 1&amp;gt;&lt;/P&gt;&lt;P&gt;for i = 1 to FieldValueCount('&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Machine&lt;/SPAN&gt;')&lt;/P&gt;&lt;P&gt;&amp;nbsp; let vS_Maschine = FieldValue('&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Machine&lt;/SPAN&gt;',$(i)); &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; $(Include=$(vPath)\cs_$(&lt;SPAN style="font-size: 13.3333330154419px;"&gt;vS_Maschine&lt;/SPAN&gt;).qvs);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;lt;Load the tables where Machine = '&lt;SPAN style="font-size: 13.3333330154419px;"&gt;$(&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;vS_Maschine&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;)' and Load = 1&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for j = 1 to FieldValueCount('&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Table&lt;/SPAN&gt;')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; let vS_Table = &lt;SPAN style="font-size: 13.3333330154419px;"&gt; FieldValue('&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Table&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;',$(j));&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; load &amp;amp; store &amp;amp; drop $(vS_Table);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; next&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; disconnect;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;next&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Make sure you disconnect at the end of each connect-loop, just to keep things clean!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;I like this solution because a) it opens and closes every connection-string only once, which is good for the performance and b) it makes adding or deleting machines/tables really easy, because you only have to set Load to '1' or '0'.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;STRONG&gt;Or do you have the same QV-application in different environments, so that it uses the same connection-string include-file, but with different paths?&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;I usually do that by checking via the document-path, whether the application is e.g. in the development or the production environment, and then setting the path accordingly: &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(index(DocumentPath(),'DEV') &amp;gt; 0) then&amp;nbsp;&amp;nbsp; (or something similar)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2015 14:32:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Differenct-connection-strings/m-p/914096#M317069</guid>
      <dc:creator>lenka_kruse</dc:creator>
      <dc:date>2015-07-24T14:32:38Z</dc:date>
    </item>
  </channel>
</rss>

