<?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: Two different connection strings in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Two-different-connection-strings/m-p/351782#M703172</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Ralf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 16 Jul 2012 10:52:10 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-07-16T10:52:10Z</dc:date>
    <item>
      <title>Two different connection strings</title>
      <link>https://community.qlik.com/t5/QlikView/Two-different-connection-strings/m-p/351780#M703170</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to two database connection strings which are from two different oracle database servers but contains same tables and views.&lt;/P&gt;&lt;P&gt;I need to connect to main database server, if connection is successful then i will use this connection string else, I will connect to secondary database server and use secondary connection string to pull the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think script would be like this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if ConnectionString1='Success' then&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ConnectionString1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Else&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ConnectionString2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;End if&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now how do I check if first/second connection is successful or not in script?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be great.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Amay.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jul 2012 09:33:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-different-connection-strings/m-p/351780#M703170</guid>
      <dc:creator />
      <dc:date>2012-07-16T09:33:24Z</dc:date>
    </item>
    <item>
      <title>Re: Two different connection strings</title>
      <link>https://community.qlik.com/t5/QlikView/Two-different-connection-strings/m-p/351781#M703171</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Amay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can catch the ScriptError:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;set ErrorMode=0;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONNECT &amp;lt;ConnectionString1&amp;gt;...;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;if ScriptError&amp;gt;1 then&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //not connected &lt;/SPAN&gt;ConnectionString1&lt;SPAN style="color: #000000;"&gt;...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CONNECT &amp;lt;ConnectionString2&amp;gt;...;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;end if&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;set ErrorMode=1;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Ralf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jul 2012 09:51:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-different-connection-strings/m-p/351781#M703171</guid>
      <dc:creator>rbecher</dc:creator>
      <dc:date>2012-07-16T09:51:39Z</dc:date>
    </item>
    <item>
      <title>Re: Two different connection strings</title>
      <link>https://community.qlik.com/t5/QlikView/Two-different-connection-strings/m-p/351782#M703172</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Ralf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jul 2012 10:52:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-different-connection-strings/m-p/351782#M703172</guid>
      <dc:creator />
      <dc:date>2012-07-16T10:52:10Z</dc:date>
    </item>
  </channel>
</rss>

