<?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 to check if &amp;quot;Create Database Connection&amp;quot; is successful? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-check-if-quot-Create-Database-Connection-quot-is/m-p/224860#M44687</link>
    <description>&lt;P&gt;You could try logic like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;my_dbc = create database connection("foobar");

if (isempty(my_dbc) | is missing(my_dbc),
	_nw = new window("Create DBC: Empty Value", &amp;lt;&amp;lt; modal,
		textbox("Error: The database connection is empty."),
		);
		throw("Empty database connection string");
);

&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 05 Sep 2019 15:40:38 GMT</pubDate>
    <dc:creator>pmroz</dc:creator>
    <dc:date>2019-09-05T15:40:38Z</dc:date>
    <item>
      <title>How to check if "Create Database Connection" is successful?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-check-if-quot-Create-Database-Connection-quot-is/m-p/224701#M44660</link>
      <description>&lt;P&gt;Many of my scripts connect to a DB as soon as they are started. DB is in intranet, so users need to:&lt;/P&gt;&lt;P&gt;1. Be connected to internal network OR have VPN on&lt;/P&gt;&lt;P&gt;2. Have ODBC source set up correctly&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sometimes they don't.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to warn users that the DB is not available instead of script erroring on them. What would be a correct way of checking if "Create Database Connection" was successful and returned a valid handle?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&amp;nbsp;&lt;/P&gt;&lt;P&gt;M.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2019 19:33:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-check-if-quot-Create-Database-Connection-quot-is/m-p/224701#M44660</guid>
      <dc:creator>miguello</dc:creator>
      <dc:date>2019-09-04T19:33:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to check if "Create Database Connection" is successful?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-check-if-quot-Create-Database-Connection-quot-is/m-p/224711#M44661</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Is Scriptable(dbc);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;works just fine, anybody has a code snippet with modal window that would just close the whole AddIn in case it evaluates "0"?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&amp;nbsp;&lt;/P&gt;&lt;P&gt;M.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2019 19:53:00 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-check-if-quot-Create-Database-Connection-quot-is/m-p/224711#M44661</guid>
      <dc:creator>miguello</dc:creator>
      <dc:date>2019-09-04T19:53:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to check if "Create Database Connection" is successful?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-check-if-quot-Create-Database-Connection-quot-is/m-p/224860#M44687</link>
      <description>&lt;P&gt;You could try logic like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;my_dbc = create database connection("foobar");

if (isempty(my_dbc) | is missing(my_dbc),
	_nw = new window("Create DBC: Empty Value", &amp;lt;&amp;lt; modal,
		textbox("Error: The database connection is empty."),
		);
		throw("Empty database connection string");
);

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 05 Sep 2019 15:40:38 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-check-if-quot-Create-Database-Connection-quot-is/m-p/224860#M44687</guid>
      <dc:creator>pmroz</dc:creator>
      <dc:date>2019-09-05T15:40:38Z</dc:date>
    </item>
  </channel>
</rss>

