<?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 Connecting to database Dynamically in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Connecting-to-database-Dynamically/m-p/474607#M693534</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Folks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I&amp;nbsp; have 2 odbc connections one for production, Development.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The entire script remains same&amp;nbsp; only i need to change the odbc connection depending on the computername or servername&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so i did like this but its not allowing me to do in the script and throwing an error.&lt;/P&gt;&lt;P&gt;if i want to use the if condition in the script&amp;nbsp; how to add??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;IF(ComputerName()='ABC','ODBC CONNECT TO [xysbef;DBQ=xysbef] (XUserId is bJKfcYZODbXKXZVMSbXEXSFMETFA, XPassword is AJWSQYZODDZCGaFMRJIQL)',&lt;/P&gt;&lt;P&gt;if(computername()='DEF','ODBC CONNECT TO [yeyeye;DBQ=yeyeye ] (XUserId is KTDBaYZODbXKXZVMSbXEXSFMEbeB, XPassword is eNUWRYZODDZCGaFMRJIAG)'));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so when the computername is identified it should connect to that server odbc connection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 07 Aug 2013 19:25:27 GMT</pubDate>
    <dc:creator>shree909</dc:creator>
    <dc:date>2013-08-07T19:25:27Z</dc:date>
    <item>
      <title>Connecting to database Dynamically</title>
      <link>https://community.qlik.com/t5/QlikView/Connecting-to-database-Dynamically/m-p/474607#M693534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Folks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I&amp;nbsp; have 2 odbc connections one for production, Development.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The entire script remains same&amp;nbsp; only i need to change the odbc connection depending on the computername or servername&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so i did like this but its not allowing me to do in the script and throwing an error.&lt;/P&gt;&lt;P&gt;if i want to use the if condition in the script&amp;nbsp; how to add??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;IF(ComputerName()='ABC','ODBC CONNECT TO [xysbef;DBQ=xysbef] (XUserId is bJKfcYZODbXKXZVMSbXEXSFMETFA, XPassword is AJWSQYZODDZCGaFMRJIQL)',&lt;/P&gt;&lt;P&gt;if(computername()='DEF','ODBC CONNECT TO [yeyeye;DBQ=yeyeye ] (XUserId is KTDBaYZODbXKXZVMSbXEXSFMEbeB, XPassword is eNUWRYZODDZCGaFMRJIAG)'));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so when the computername is identified it should connect to that server odbc connection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Aug 2013 19:25:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Connecting-to-database-Dynamically/m-p/474607#M693534</guid>
      <dc:creator>shree909</dc:creator>
      <dc:date>2013-08-07T19:25:27Z</dc:date>
    </item>
    <item>
      <title>Re: Connecting to database Dynamically</title>
      <link>https://community.qlik.com/t5/QlikView/Connecting-to-database-Dynamically/m-p/474608#M693535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Shree,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;just use the IF statement, not function:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF ComputerName()='ABC' THEN&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ODBC CONNECT TO [xysbef;DBQ=xysbef] (XUserId is bJKfcYZODbXKXZVMSbXEXSFMETFA, XPassword is AJWSQYZODDZCGaFMRJIQL);&lt;/P&gt;&lt;P&gt;ELSEIF ComputerName()='DEF' THEN&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ODBC CONNECT TO [yeyeye;DBQ=yeyeye ] (XUserId is KTDBaYZODbXKXZVMSbXEXSFMEbeB, XPassword is eNUWRYZODDZCGaFMRJIAG)';&lt;/P&gt;&lt;P&gt;ELSE&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // error action&lt;/P&gt;&lt;P&gt;END IF&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Ralf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Aug 2013 19:29:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Connecting-to-database-Dynamically/m-p/474608#M693535</guid>
      <dc:creator>rbecher</dc:creator>
      <dc:date>2013-08-07T19:29:59Z</dc:date>
    </item>
    <item>
      <title>Re: Connecting to database Dynamically</title>
      <link>https://community.qlik.com/t5/QlikView/Connecting-to-database-Dynamically/m-p/474609#M693536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp; &lt;A _jive_internal="true" class="jiveTT-hover-user jive-username-link" href="https://community.qlik.com/people/rbecher" id="jive-313629291164535369769" style="background-color: #ffffff; font-size: 12px; color: #007fc0; font-weight: bold; font-family: Arial; text-align: center;"&gt;Ralf Becher&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That works perfect...&lt;/P&gt;&lt;P&gt;&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;Sree&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Aug 2013 21:36:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Connecting-to-database-Dynamically/m-p/474609#M693536</guid>
      <dc:creator>shree909</dc:creator>
      <dc:date>2013-08-07T21:36:24Z</dc:date>
    </item>
  </channel>
</rss>

