<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1018475" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1018475</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/need-code-test-if-connection-open-or-not#comment-1108695</link>
    <description> &lt;p&gt;The code I always use is:&lt;/p&gt;
&lt;p&gt;If objADOConnection.State Then objADOConnection.Close&lt;br /&gt;
     Set objADOConnection = Nothing&lt;br /&gt;
End If&lt;/p&gt;
&lt;p&gt;objADOConnection is my ADO Connection. This If statement detects if the connection is open and closes it if it is.&lt;/p&gt;
 </description>
     <pubDate>Fri, 10 May 2002 12:36:25 +0000</pubDate>
 <dc:creator>Peter J. Boettcher</dc:creator>
 <guid isPermaLink="false">comment 1108695 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/need-code-test-if-connection-open-or-not#comment-1108661</link>
    <description> &lt;p&gt;O, didn&#039;t look at the &amp;lt;% tags... o well. I don&#039;t know ASP.&lt;/p&gt;
 </description>
     <pubDate>Fri, 10 May 2002 00:17:16 +0000</pubDate>
 <dc:creator>necrotic</dc:creator>
 <guid isPermaLink="false">comment 1108661 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/need-code-test-if-connection-open-or-not#comment-1108592</link>
    <description> &lt;p&gt;I think they want ASP code.&lt;br /&gt;
You could probly do something like this:&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;Set Conn = Server.CreateObject(&amp;quot;ADODB.Connection&amp;quot;) &lt;br /&gt;ConnString = &amp;quot;Provider=MSDASQL;Driver={Microsoft Access Driver (*.mdb)}; &amp;quot;&lt;br /&gt;ConnString = ConnString &amp;amp; &amp;quot;DBQ=&amp;quot; &amp;amp; Server.MapPath(&amp;quot;\path\datbase.mdb&amp;quot;) &amp;amp; &amp;quot;; &amp;quot;&lt;br /&gt;ConnString = ConnString &amp;amp; &amp;quot;PWD=databasepassword&amp;quot;&lt;br /&gt;Set OpenConn = Conn.Open(ConnString)&lt;br /&gt;If Not OpenConn=0 Then&lt;br /&gt;Response.Write &amp;quot;Database opened&amp;quot;&lt;br /&gt;End If&lt;/code&gt;&lt;/div&gt;&#039;&lt;/p&gt;
&lt;p&gt;That code would probably work (may take some tweaking) but the problem is that ASP would give you an error before you even get to check for the connection being open. If you could turn off these errors then you might be able to work out some sort of way to do it.&lt;br /&gt;
Good luck.&lt;br /&gt;
-dk&lt;/p&gt;
 </description>
     <pubDate>Thu, 09 May 2002 10:10:25 +0000</pubDate>
 <dc:creator>dk01</dc:creator>
 <guid isPermaLink="false">comment 1108592 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/need-code-test-if-connection-open-or-not#comment-1108543</link>
    <description> &lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;if (!&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$connection&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;) {&lt;br /&gt;&amp;nbsp; echo &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$connection&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;;&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;br /&gt;
Is that what you want?&lt;/p&gt;
 </description>
     <pubDate>Thu, 09 May 2002 00:00:03 +0000</pubDate>
 <dc:creator>necrotic</dc:creator>
 <guid isPermaLink="false">comment 1108543 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
