<?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: Stop Script execution when not connected with database in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Stop-Script-execution-when-not-connected-with-database/m-p/296055#M706113</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, 23 Jan 2012 05:27:56 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-01-23T05:27:56Z</dc:date>
    <item>
      <title>Stop Script execution when not connected with database</title>
      <link>https://community.qlik.com/t5/QlikView/Stop-Script-execution-when-not-connected-with-database/m-p/296051#M706108</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Im using ODBC CONNECT32 TO [$(vDbInstance);DBQ=$(vDbInstance)] (UserId is $(vDbUsername), Password is $(vDbPassword)); to connect to my database. How to handle when database conneciton not available ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set ErrorMode=0;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; ODBC CONNECT32 TO [$(vDbInstance);DBQ=$(vDbInstance)] (UserId is $(vDbUsername), Password is $(vDbPassword)); &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if ScriptError &amp;gt;= 1 then&amp;nbsp;&amp;nbsp; // or ScriptError &amp;gt; 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //no connect...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CALL Log('WARN:Error in commection -&amp;nbsp; ' &amp;amp; '$(vDbInstance)' &amp;amp; ',cannot continue' );&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; exit Script;&lt;/P&gt;&lt;P&gt;end if &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Script execution says &lt;/P&gt;&lt;P&gt;Failed to connect&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Error Msg Box&lt;/P&gt;&lt;P&gt;SQL##f - SqlState: S1000, ErrorCode: 12541, ErrorMsg: [Oracle][ODBC][Ora]ORA-12541: TNS:no listener&lt;/P&gt;&lt;P&gt;&amp;nbsp; ODBC CONNECT32 TO [dim74t1;DBQ=dim74t1] (UserId is IBI, Password is IBI)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Jan 2012 18:53:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Stop-Script-execution-when-not-connected-with-database/m-p/296051#M706108</guid>
      <dc:creator />
      <dc:date>2012-01-21T18:53:12Z</dc:date>
    </item>
    <item>
      <title>Stop Script execution when not connected with database</title>
      <link>https://community.qlik.com/t5/QlikView/Stop-Script-execution-when-not-connected-with-database/m-p/296052#M706109</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Would pingin the server help you?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://community.qlik.com/message/80817#80817"&gt;http://community.qlik.com/message/80817#80817&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Jan 2012 23:47:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Stop-Script-execution-when-not-connected-with-database/m-p/296052#M706109</guid>
      <dc:creator>disqr_rm</dc:creator>
      <dc:date>2012-01-21T23:47:36Z</dc:date>
    </item>
    <item>
      <title>Stop Script execution when not connected with database</title>
      <link>https://community.qlik.com/t5/QlikView/Stop-Script-execution-when-not-connected-with-database/m-p/296053#M706110</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Rakesh , will try that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any Idea why it didnt catch up wtih ErrorCode &amp;gt;1 ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 22 Jan 2012 03:40:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Stop-Script-execution-when-not-connected-with-database/m-p/296053#M706110</guid>
      <dc:creator />
      <dc:date>2012-01-22T03:40:04Z</dc:date>
    </item>
    <item>
      <title>Re: Stop Script execution when not connected with database</title>
      <link>https://community.qlik.com/t5/QlikView/Stop-Script-execution-when-not-connected-with-database/m-p/296054#M706111</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;you could use the Oracle program tnsping:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Load Script:&lt;/P&gt;&lt;P&gt;execute cmd.exe /C "tnsping dim74t1 &amp;gt;tnsping.out";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tnsping:&lt;/P&gt;&lt;P&gt;LOAD @1&lt;/P&gt;&lt;P&gt;FROM tnsping.out (txt, codepage is 1252, no labels, delimiter is '\t', no quotes)&lt;/P&gt;&lt;P&gt;WHERE left(@1,9)='TNS-12541';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF NoOfRows('tnsping') THEN&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TRACE TNS:no listener;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exit script;&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>Sun, 22 Jan 2012 18:09:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Stop-Script-execution-when-not-connected-with-database/m-p/296054#M706111</guid>
      <dc:creator>rbecher</dc:creator>
      <dc:date>2012-01-22T18:09:16Z</dc:date>
    </item>
    <item>
      <title>Re: Stop Script execution when not connected with database</title>
      <link>https://community.qlik.com/t5/QlikView/Stop-Script-execution-when-not-connected-with-database/m-p/296055#M706113</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, 23 Jan 2012 05:27:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Stop-Script-execution-when-not-connected-with-database/m-p/296055#M706113</guid>
      <dc:creator />
      <dc:date>2012-01-23T05:27:56Z</dc:date>
    </item>
  </channel>
</rss>

