<?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 Dynamically Change DataSource in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Dynamically-Change-DataSource/m-p/422347#M157377</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 have a QVW file which is currently built against&amp;nbsp; the Development Server of Sql Server,And i have plenty of those.Is there anyway that&amp;nbsp; the DataSource inside the Connection String can be changed from Dev to prod while moving these QVD's into Prod environment rather than editing the script task each and every time and chaging the DataSource?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sujith.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 02 May 2013 20:23:16 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-05-02T20:23:16Z</dc:date>
    <item>
      <title>Dynamically Change DataSource</title>
      <link>https://community.qlik.com/t5/QlikView/Dynamically-Change-DataSource/m-p/422347#M157377</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 have a QVW file which is currently built against&amp;nbsp; the Development Server of Sql Server,And i have plenty of those.Is there anyway that&amp;nbsp; the DataSource inside the Connection String can be changed from Dev to prod while moving these QVD's into Prod environment rather than editing the script task each and every time and chaging the DataSource?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sujith.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 May 2013 20:23:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dynamically-Change-DataSource/m-p/422347#M157377</guid>
      <dc:creator />
      <dc:date>2013-05-02T20:23:16Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically Change DataSource</title>
      <link>https://community.qlik.com/t5/QlikView/Dynamically-Change-DataSource/m-p/422348#M157378</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I believe the best practice for this is to use an external text file and include that file into your code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That way you can just change the text file in production but you don't need to change the QVW everytime you move it to production.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 May 2013 20:29:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dynamically-Change-DataSource/m-p/422348#M157378</guid>
      <dc:creator>danielrozental</dc:creator>
      <dc:date>2013-05-02T20:29:04Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically Change DataSource</title>
      <link>https://community.qlik.com/t5/QlikView/Dynamically-Change-DataSource/m-p/422349#M157379</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Let's do this over here, it might help someone else.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create a text file, call it config.txt&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Write the following into the file&lt;/P&gt;&lt;P&gt;let vDATASOURCE = 'yourdevelopmentdatasource';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then your QVW code will be&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$(Include=config.txt)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: arial; font-size: small;"&gt;OLEDB CONNECT TO [...&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: arial; font-size: small;"&gt;;Data Source=$(vDATASOURCE);...]&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 May 2013 20:45:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dynamically-Change-DataSource/m-p/422349#M157379</guid>
      <dc:creator>danielrozental</dc:creator>
      <dc:date>2013-05-02T20:45:36Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically Change DataSource</title>
      <link>https://community.qlik.com/t5/QlikView/Dynamically-Change-DataSource/m-p/422350#M157380</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Daniel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply,I created a txt file with the name of the server in it and inside the Datasource i gave the vDATASOURCE thing but when i hit a reload its asking me for the name of the server each and every time.Is there any way to get around it?I included the name of the server in my text file .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sujith.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 May 2013 20:54:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dynamically-Change-DataSource/m-p/422350#M157380</guid>
      <dc:creator />
      <dc:date>2013-05-02T20:54:58Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically Change DataSource</title>
      <link>https://community.qlik.com/t5/QlikView/Dynamically-Change-DataSource/m-p/422351#M157381</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is it asking for the server name or for the connection credentials?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 May 2013 20:56:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dynamically-Change-DataSource/m-p/422351#M157381</guid>
      <dc:creator>danielrozental</dc:creator>
      <dc:date>2013-05-02T20:56:42Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically Change DataSource</title>
      <link>https://community.qlik.com/t5/QlikView/Dynamically-Change-DataSource/m-p/422352#M157382</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is asking for the server name as well as the Login Credentials however if i just mention the server name and hit ok it takes it and reloads the script.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 May 2013 20:57:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dynamically-Change-DataSource/m-p/422352#M157382</guid>
      <dc:creator />
      <dc:date>2013-05-02T20:57:51Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically Change DataSource</title>
      <link>https://community.qlik.com/t5/QlikView/Dynamically-Change-DataSource/m-p/422353#M157383</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does it work fine if you don't use the variable and just write the source name in the script? Or does it still ask you for the server name?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 May 2013 20:59:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dynamically-Change-DataSource/m-p/422353#M157383</guid>
      <dc:creator>danielrozental</dc:creator>
      <dc:date>2013-05-02T20:59:50Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically Change DataSource</title>
      <link>https://community.qlik.com/t5/QlikView/Dynamically-Change-DataSource/m-p/422354#M157384</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Daniel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me be clear here I created a text file named servers.txt which has&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let vDATASOURCE = 'JJLEDW1'; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;inside it.I also created a variable named 'vDATASOURCE' and set the Input Constraints to No Constraints and didnt give any value for the variable either.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Inside the script task ,I did something like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$(Include=Servers.txt)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OLEDB CONNECT TO [.............Data Source=$(vDATASOURCE);........]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now when i hit a reload its asking me for the server name?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you correct me if i went wrong somewhere?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sujith.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 May 2013 21:12:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dynamically-Change-DataSource/m-p/422354#M157384</guid>
      <dc:creator />
      <dc:date>2013-05-02T21:12:37Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically Change DataSource</title>
      <link>https://community.qlik.com/t5/QlikView/Dynamically-Change-DataSource/m-p/422355#M157385</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry Sujith, I made a mistake, you need to write the entire connection string into the text file.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 May 2013 22:04:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dynamically-Change-DataSource/m-p/422355#M157385</guid>
      <dc:creator>danielrozental</dc:creator>
      <dc:date>2013-05-02T22:04:09Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically Change DataSource</title>
      <link>https://community.qlik.com/t5/QlikView/Dynamically-Change-DataSource/m-p/422356#M157386</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Daniel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks it worked i copied the whole connection string into a text file and used a incluse statement inside the script task to call the file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 May 2013 17:31:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dynamically-Change-DataSource/m-p/422356#M157386</guid>
      <dc:creator />
      <dc:date>2013-05-03T17:31:45Z</dc:date>
    </item>
  </channel>
</rss>

