<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>DevForce Community Forum : Checking Connection to a Web Database</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce Classic : Checking Connection to a Web Database</description>
  <pubDate>Sat, 11 Apr 2026 10:56:10 -700</pubDate>
  <lastBuildDate>Mon, 15 Jun 2009 10:04:25 -700</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.69</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.ideablade.com/forum/RSS_post_feed.asp?TID=1319</WebWizForums:feedURL>
  <image>
   <title>DevForce Community Forum</title>
   <url>http://www.ideablade.com/forum/forum_images/IdeaBlade_logo_tm.png</url>
   <link>http://www.ideablade.com/forum/</link>
  </image>
  <item>
   <title>Checking Connection to a Web Database : CheckDataSourceKey, in order to...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1319&amp;PID=4760#4760</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=11" rel="nofollow">kimj</a><br /><strong>Subject:</strong> 1319<br /><strong>Posted:</strong> 15-Jun-2009 at 10:04am<br /><br />CheckDataSourceKey, in order to validate the connection information,&nbsp;will open up a test connection to the DB.&nbsp; If all you need is to determine if the server hosting the DB is available, then PingServer(url) in IdeaBlade.Util.HttpFns might help.&nbsp; Note that ping will take the URL for the server, so you'll have to build it up from information in the connection string.<DIV>&nbsp;</DIV><DIV>You can multi-thread the PingServer call without potential problems.&nbsp; CheckDataSourceKey is probably safe to use multi-threaded, but it would still be a better idea to make that call from another PM when using a separate thread.</DIV><DIV>&nbsp;</DIV><DIV>You don't need to use DevForce to check the internet connection - the System.Net.NetworkInformation namespace contains some useful classes, such as Ping or NetworkInterface, which may do what you need.</DIV>]]>
   </description>
   <pubDate>Mon, 15 Jun 2009 10:04:25 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1319&amp;PID=4760#4760</guid>
  </item> 
  <item>
   <title>Checking Connection to a Web Database : Hi All, During the load of our...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1319&amp;PID=4756#4756</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=441" rel="nofollow">*Calsy</a><br /><strong>Subject:</strong> 1319<br /><strong>Posted:</strong> 14-Jun-2009 at 8:17pm<br /><br />Hi All, <br>During the load of our application we need to check if the user can access an SQL DB via the web and set a system boolean which we will then refer to. We use the following code:<br><br>&nbsp;Dim x As IdeaBlade.Util.IdeaBladeConfig = IdeaBlade.Util.IdeaBladeConfig.Instance<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; x.RdbKeys(1).Connection = "SQLConnectionGoesHERE"<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BO.SystemProperties.PMWebConnection = New PersistenceManager(True, "Key")<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If BO.SystemProperties.PMWebConnection.CheckDataSourceKey("Key") = DataSourceKeyStatus.UnableToConnect Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BO.SystemProperties.IsUserPortalConnected = False<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Else<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BO.SystemProperties.IsUserPortalConnected = True<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<br><br>This does work however when the CheckDataSourceKey section runs and there is no internet connection available it can take up to 15 seconds until it moves to the next line.<br><br>Is there a better(quicker) way to do this or is there a safe way I can multi-thread the database connection check as this is just too long for the user to wait.<br><br>Thanks<br>]]>
   </description>
   <pubDate>Sun, 14 Jun 2009 20:17:06 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1319&amp;PID=4756#4756</guid>
  </item> 
 </channel>
</rss>