<?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: How do I create a script which retries to connect to SQL? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-do-I-create-a-script-which-retries-to-connect-to-SQL/m-p/538614#M75970</link>
    <description>&lt;P&gt;You might be able to use the LogCapture() function which allows you capture messages sent back to the JMP log by function calls.&lt;/P&gt;
&lt;P&gt;Something like this :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;RetryCount = 0
ErrMsg = LogCapture(&amp;lt;your SQL connection string&amp;gt;);
while( contains(ErrMsg, &amp;lt;some error string you're looking for&amp;gt;) &amp;amp; RetryCount &amp;lt; 5,
++RetryCount;
ErrMsg = LogCapture(&amp;lt;your SQL connection string&amp;gt;);
)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 30 Aug 2022 06:02:37 GMT</pubDate>
    <dc:creator>tsl</dc:creator>
    <dc:date>2022-08-30T06:02:37Z</dc:date>
    <item>
      <title>How do I create a script which retries to connect to SQL?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-create-a-script-which-retries-to-connect-to-SQL/m-p/538607#M75969</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The database which I am using is very unstable, so it fails a lot mid-way when tries to connect to SQL. How do I script it so that when it fails, it retries unitil it connects or until a maximum of five times.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 17:08:41 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-create-a-script-which-retries-to-connect-to-SQL/m-p/538607#M75969</guid>
      <dc:creator>PowerOx327</dc:creator>
      <dc:date>2023-06-09T17:08:41Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create a script which retries to connect to SQL?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-create-a-script-which-retries-to-connect-to-SQL/m-p/538614#M75970</link>
      <description>&lt;P&gt;You might be able to use the LogCapture() function which allows you capture messages sent back to the JMP log by function calls.&lt;/P&gt;
&lt;P&gt;Something like this :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;RetryCount = 0
ErrMsg = LogCapture(&amp;lt;your SQL connection string&amp;gt;);
while( contains(ErrMsg, &amp;lt;some error string you're looking for&amp;gt;) &amp;amp; RetryCount &amp;lt; 5,
++RetryCount;
ErrMsg = LogCapture(&amp;lt;your SQL connection string&amp;gt;);
)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2022 06:02:37 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-create-a-script-which-retries-to-connect-to-SQL/m-p/538614#M75970</guid>
      <dc:creator>tsl</dc:creator>
      <dc:date>2022-08-30T06:02:37Z</dc:date>
    </item>
  </channel>
</rss>

