<?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 close database connection after running a New Sql Query? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-close-database-connection-after-running-a-New-Sql-Query/m-p/324761#M57411</link>
    <description>&lt;P&gt;I have exactly this same question.&amp;nbsp; I have a database that does not deal well with non-terminated connections and can't always use Open Database Connection()/Close Database Connection with a DSN name..if I use an ODBC:driver string, I have to use New SQL Query, but I don't see a way to close it when finished.&lt;/P&gt;</description>
    <pubDate>Wed, 21 Oct 2020 18:30:10 GMT</pubDate>
    <dc:creator>Gerry_R</dc:creator>
    <dc:date>2020-10-21T18:30:10Z</dc:date>
    <item>
      <title>How to close database connection after running a New Sql Query?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-close-database-connection-after-running-a-New-Sql-Query/m-p/250556#M49179</link>
      <description>&lt;P&gt;Steps to reproduce:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Run any new sql query:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;query &amp;lt;&amp;lt; Run Foreground(
	OnRunComplete(
		Write( "Number of rows in query result: ", N Rows( queryResult ) )
	)
);

MyRunCompleteFunc = Function( {dt},
	{Default Local},
	Write( "Number of rows in query result: ", N Rows( dt ) )
);
query &amp;lt;&amp;lt; Run Foreground( OnRunComplete( MyRunCompleteFunc ) );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Next, if you try to delete the database, it will say that jmp is still using the database.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to close the database connection? The function Close Database Connection() does not seem to do the trick.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Mar 2020 16:21:52 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-close-database-connection-after-running-a-New-Sql-Query/m-p/250556#M49179</guid>
      <dc:creator>douglaschong</dc:creator>
      <dc:date>2020-03-04T16:21:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to close database connection after running a New Sql Query?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-close-database-connection-after-running-a-New-Sql-Query/m-p/324761#M57411</link>
      <description>&lt;P&gt;I have exactly this same question.&amp;nbsp; I have a database that does not deal well with non-terminated connections and can't always use Open Database Connection()/Close Database Connection with a DSN name..if I use an ODBC:driver string, I have to use New SQL Query, but I don't see a way to close it when finished.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Oct 2020 18:30:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-close-database-connection-after-running-a-New-Sql-Query/m-p/324761#M57411</guid>
      <dc:creator>Gerry_R</dc:creator>
      <dc:date>2020-10-21T18:30:10Z</dc:date>
    </item>
  </channel>
</rss>

