<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Hurricane Blog</title>
	<atom:link href="http://hurcane.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://hurcane.wordpress.com</link>
	<description>Making a Big Wind</description>
	<lastBuildDate>Wed, 26 Oct 2011 13:26:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='hurcane.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Hurricane Blog</title>
		<link>http://hurcane.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://hurcane.wordpress.com/osd.xml" title="Hurricane Blog" />
	<atom:link rel='hub' href='http://hurcane.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Interop Forms Toolkit UserControls Can Launch a .NET Form!</title>
		<link>http://hurcane.wordpress.com/2011/09/23/interop-forms-toolkit-usercontrols-can-launch-a-net-form/</link>
		<comments>http://hurcane.wordpress.com/2011/09/23/interop-forms-toolkit-usercontrols-can-launch-a-net-form/#comments</comments>
		<pubDate>Fri, 23 Sep 2011 18:46:36 +0000</pubDate>
		<dc:creator>hurcane</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://hurcane.wordpress.com/?p=226</guid>
		<description><![CDATA[At work, we&#8217;re heavily invested in the Interop Forms Toolkit while our product is slowly being migrated from VB6 to .NET. When you are creating a .NET control to be hosted on a VB6 form, there are several limitations mentioned in the documentation, including: You should not show a .NET form from an Interop UserControl. The .NET form [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hurcane.wordpress.com&amp;blog=220718&amp;post=226&amp;subd=hurcane&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>At work, we&#8217;re heavily invested in the <a href="http://msdn.microsoft.com/en-us/vbasic/bb419144">Interop Forms Toolkit</a> while our product is slowly being migrated from VB6 to .NET.</p>
<p>When you are creating a .NET control to be hosted on a VB6 form, there are several limitations mentioned in the documentation, including:</p>
<blockquote><p>You should not show a .NET form from an Interop UserControl. The .NET form will not close if the parent form is closed first, and tabbing on the .NET form will not work.</p></blockquote>
<p>This was going to be a problem for us. Our product has lookup text boxes that launch a search dialog when the user leaves the field with a partial or ambiguous value. The search dialog is a .NET form, so we were concerned that this was going to cause problems.</p>
<p>We tried it anyway. Our interop user controls are always composite controls that can include multiple lookup text boxes. We figured that maybe things would be a little different because we were showing the form modally from within a contained control.</p>
<p>We found that it worked, mostly. The big stickler was when a highly productive worker was entering data using the keyboard. The TAB key would launch the search dialog, but then the focus got stuck somewhere that would not respond to the keyboard any more. They had to use the mouse to get focus back on the form, which was disruptive to their flow.</p>
<p>Other workflow scenarios, such as explicitly launching the search dialog with a function key (i.e. not tabbing) were working just fine and not losing focus.</p>
<p>I won&#8217;t rehash all the details of the debugging effort. We added lots of debug statements to event handlers and overrides of methods that were related to key input and focus. We were able to identify this sequence of events that was relevant:</p>
<ol>
<li><strong>&#8220;Entered&#8221; event on the constituent lookup control.</strong></li>
<li><strong>&#8220;ProcessTabKey&#8221; method on the host user control.</strong></li>
<li>&#8220;Leave&#8221; event on the constituent lookup control.</li>
<li><strong>&#8220;Leave&#8221; event on the host user control.</strong></li>
<li>Search dialog is displayed&#8230;</li>
<li>&#8220;Validating&#8221; event on the constituent lookup control.</li>
<li><strong>&#8220;Validated&#8221; event on the constituent lookup control.</strong></li>
</ol>
<div>Using the bolded items, we were able to design a state diagram to handle this issue and force focus back to where it should have gone in the first place. The following region of code lives on the top user control. My wish is that this code could be useful to somebody else experiencing a similar problem.</div>
<div>
<pre><code>
#Region " Custom search focus handling "
    ' When this control is hosted on a VB6 form using interop, tabbing out of a field that
    ' launches a custom search dialog causes focus to leave the control and the user
    ' can no longer navigate with the keyboard unless they use the mouse to put focus
    ' back into the control. This block of code detects the scenario and sets focus to the
    ' appropriate control.

    ' Two textboxes on the new item use custom search:
    '   Lookup1
    '   Lookup2

    ' The following sequence of events leads to the problem. These events can also
    ' occur in other scenarios, but they will not occur in this exact sequence.
    ' Lookup control is entered
    ' Tab key is pressed (ProcessTabKey)
    ' Custom search dialog makes this control lose focus (OnLeave)

    ' The fix will set focus back to the appropriate field after the dialog
    ' returns. This will happen when the control is validated, but only when
    ' the appropriate sequence of events has occurred. A state machine enum
    ' is used to manage this.

    Private Enum CustomSearchFieldState
        Null
        Editing
        Tabbing
        NeedsFocus
    End Enum

    Dim mCustomSearchFieldState As CustomSearchFieldState = CustomSearchFieldState.Null
    Dim mCustomSearchField As MyCustomLookupTextBox
    Dim mCustomSearchFieldTabForward As Boolean = False

    Private Sub CustomSearchEnter(sender As Object, e As System.EventArgs) _
    Handles Lookup1.Enter, Lookup2.Enter
        ' The problem only occurs when the control is hosted in VB6. We can detect that specific
        ' scenario through the ParentForm property. In .NET, we will have a parent form. In VB6,
        ' the parent form is null.
        If Me.ParentForm Is Nothing AndAlso
        mCustomSearchFieldState = CustomSearchFieldState.Null Then
            mCustomSearchField = DirectCast(sender, MyCustomLookupTextBox)
            mCustomSearchFieldState = CustomSearchFieldState.Editing
        End If
    End Sub

    Protected Overrides Function ProcessTabKey(forward As Boolean) As Boolean
        If mCustomSearchFieldState = CustomSearchFieldState.NeedsFocus Then
            ' This state indicates that the user canceled out of a previous custom
            ' search. They may have chosen to change direction, so we update
            ' the direction flag.
            mCustomSearchFieldTabForward = forward
        End If
        If mCustomSearchFieldState = CustomSearchFieldState.Editing Then
            mCustomSearchFieldState = CustomSearchFieldState.Tabbing
            mCustomSearchFieldTabForward = forward
        End If
        Return MyBase.ProcessTabKey(forward)
    End Function

    Protected Overrides Sub OnLeave(e As System.EventArgs)
        If mCustomSearchFieldState = CustomSearchFieldState.Tabbing Then
            mCustomSearchFieldState = CustomSearchFieldState.NeedsFocus
        End If
        MyBase.OnLeave(e)
    End Sub

    Private Sub CustomSearchValidated(sender As Object, e As System.EventArgs) _
    Handles Lookup1.Validated, Lookup2.Validated
        If mCustomSearchFieldState = CustomSearchFieldState.NeedsFocus Then
            Me.Focus()
            Me.SelectNextControl(mCustomSearchField, mCustomSearchFieldTabForward, True, True, True)
        End If
        ' Validation is the final event in all states and resets the custom search workaroud.
        mCustomSearchFieldState = CustomSearchFieldState.Null
        mCustomSearchField = Nothing
    End Sub

#End Region</code></pre>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hurcane.wordpress.com/226/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hurcane.wordpress.com/226/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hurcane.wordpress.com/226/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hurcane.wordpress.com/226/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hurcane.wordpress.com/226/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hurcane.wordpress.com/226/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hurcane.wordpress.com/226/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hurcane.wordpress.com/226/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hurcane.wordpress.com/226/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hurcane.wordpress.com/226/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hurcane.wordpress.com/226/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hurcane.wordpress.com/226/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hurcane.wordpress.com/226/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hurcane.wordpress.com/226/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hurcane.wordpress.com&amp;blog=220718&amp;post=226&amp;subd=hurcane&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hurcane.wordpress.com/2011/09/23/interop-forms-toolkit-usercontrols-can-launch-a-net-form/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b51e10f5987a69e055d9e5540ee97892?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hurcane</media:title>
		</media:content>
	</item>
		<item>
		<title>Amen, Brother Wirth!</title>
		<link>http://hurcane.wordpress.com/2009/07/20/amen-brother-wirth/</link>
		<comments>http://hurcane.wordpress.com/2009/07/20/amen-brother-wirth/#comments</comments>
		<pubDate>Mon, 20 Jul 2009 13:13:38 +0000</pubDate>
		<dc:creator>hurcane</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://hurcane.wordpress.com/?p=218</guid>
		<description><![CDATA[From an interview with Niklaus Wirth (added emphasis is mine): RM: ‟Do you think better education is the answer to poor software? Surely teaching people better would be cheaper in the long run and certainly avoid the huge bloat we see today and we would be able to use simpler and less power-hungry hardware?” NW: [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hurcane.wordpress.com&amp;blog=220718&amp;post=218&amp;subd=hurcane&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>From an <a title="Niklaus Wirth: Geek of the Week" href="http://www.simple-talk.com/opinion/geek-of-the-week/niklaus-wirth-geek-of-the-week/?utm_source=simpletalk&amp;utm_medium=email&amp;utm_content=NiklausWirthGOTW20090713&amp;utm_campaign=Opinion">interview with Niklaus Wirth</a> (added emphasis is mine):</p>
<dl>
<blockquote><dt>RM: </dt>
<dd>‟Do you think better education is the answer to poor software? Surely teaching people better would be cheaper in the long run and certainly avoid the huge bloat we see today and we would be able to use simpler and less power-hungry hardware?” </dd>
<dt>NW: </dt>
<dd>‟A proper education certainly would help. However, the belief is wide-spread that programming is easy, can be learned on the job, and does not require specific training or talent. However, it is not programming in the sense of coding that is the problem, but design. Applications have become very demanding and their tasks complex. Mastering this growing complexity is the primary challenge. To tackle this task requires experience and an explicit ability for abstraction on many levels. It is difficult to learn this, and even more so to teach it. <strong>Not every programmer is a born designer.</strong>” </dd>
</blockquote>
</dl>
<p>All I can say to this is &#8220;Amen, Brother!&#8221; I have worked side-by-side with a number of developers over the years, and I consider this statement to be an absolute truth.</p>
<p>I also believe that programmers who have a natural ability to easily context-switch between details and abstract concepts fall into the category of programmers who are an <a href="http://www.devtopics.com/programmer-productivity-the-tenfinity-factor/">order of magnitude more productive</a> than many of their peers.</p>
<p>I think algebra is a good precursor to identifying programming potential. Prior to algebra, math education in the United States focuses on the mechanics. Success in algebra requires an ability to take abstract problems (i.e. word/story problems) and translate them into concrete details.</p>
<p>In school, I tutored a handful of friends and classmates who were taking algebra. Some just needed a different viewpoint to grasp the concept they were struggling with. Others, however, just did not get the concepts, and I believe their brains are simply not wired to think that way. These were not stupid people! They had talents in other areas that just didn&#8217;t fit into the abstract concepts of algebra.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hurcane.wordpress.com/218/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hurcane.wordpress.com/218/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hurcane.wordpress.com/218/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hurcane.wordpress.com/218/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hurcane.wordpress.com/218/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hurcane.wordpress.com/218/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hurcane.wordpress.com/218/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hurcane.wordpress.com/218/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hurcane.wordpress.com/218/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hurcane.wordpress.com/218/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hurcane.wordpress.com/218/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hurcane.wordpress.com/218/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hurcane.wordpress.com/218/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hurcane.wordpress.com/218/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hurcane.wordpress.com&amp;blog=220718&amp;post=218&amp;subd=hurcane&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hurcane.wordpress.com/2009/07/20/amen-brother-wirth/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b51e10f5987a69e055d9e5540ee97892?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hurcane</media:title>
		</media:content>
	</item>
		<item>
		<title>Foul on Microsoft: Improper verbification</title>
		<link>http://hurcane.wordpress.com/2008/08/18/improper-verbification/</link>
		<comments>http://hurcane.wordpress.com/2008/08/18/improper-verbification/#comments</comments>
		<pubDate>Mon, 18 Aug 2008 20:06:59 +0000</pubDate>
		<dc:creator>hurcane</dc:creator>
				<category><![CDATA[Miscellaneous]]></category>

		<guid isPermaLink="false">http://hurcane.wordpress.com/?p=211</guid>
		<description><![CDATA[From the ZDNet blog, with my own emphasis: &#8220;We’ve been gradually realizing customers who consumer more proactive services are happier and healthier and require less reactive services with their charge models.&#8221; I hope this is a typo, but knowing the propensity for Microsoft-speak, I would not be surprised if the marketing team has made this [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hurcane.wordpress.com&amp;blog=220718&amp;post=211&amp;subd=hurcane&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>From the <a href="http://blogs.zdnet.com/microsoft/?p=1532&amp;tag=nl.e550">ZDNet blog</a>, with my own emphasis:</p>
<blockquote><p>&#8220;We’ve been gradually realizing customers who <strong>consumer </strong>more proactive services are happier and healthier and require less reactive services with their charge models.&#8221;</p></blockquote>
<p>I hope this is a typo, but knowing the propensity for <a href="http://cinepad.com/mslex.htm">Microsoft-speak</a>, I would not be surprised if the marketing team has made this <a href="http://thesaurus.reference.com/browse/consumer">noun</a> into a verb.</p>
<p>One of the synonyms of consumer is customer. If you make that subsitution, the phrase becomes &#8220;&#8230;customers who customer more proactive services&#8230;&#8221;</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/hurcane.wordpress.com/211/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/hurcane.wordpress.com/211/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hurcane.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hurcane.wordpress.com/211/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hurcane.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hurcane.wordpress.com/211/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hurcane.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hurcane.wordpress.com/211/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hurcane.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hurcane.wordpress.com/211/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hurcane.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hurcane.wordpress.com/211/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hurcane.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hurcane.wordpress.com/211/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hurcane.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hurcane.wordpress.com/211/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hurcane.wordpress.com&amp;blog=220718&amp;post=211&amp;subd=hurcane&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hurcane.wordpress.com/2008/08/18/improper-verbification/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b51e10f5987a69e055d9e5540ee97892?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hurcane</media:title>
		</media:content>
	</item>
		<item>
		<title>Remote administration of COM+ through a firewall</title>
		<link>http://hurcane.wordpress.com/2008/06/11/remote-administration-of-com-through-a-firewall/</link>
		<comments>http://hurcane.wordpress.com/2008/06/11/remote-administration-of-com-through-a-firewall/#comments</comments>
		<pubDate>Wed, 11 Jun 2008 13:40:58 +0000</pubDate>
		<dc:creator>hurcane</dc:creator>
				<category><![CDATA[Miscellaneous]]></category>

		<guid isPermaLink="false">http://hurcane.wordpress.com/?p=208</guid>
		<description><![CDATA[Goal: Administer COM+ applications on remote computers. Problem: Windows firewall on the remote computer blocks the connection. Solution: Set up the firewall to accept dynamic RPC ports. The most relevant article to this topic is available here. I searched Google for an hour, and could not find anywhere that somebody had documented how to set [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hurcane.wordpress.com&amp;blog=220718&amp;post=208&amp;subd=hurcane&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Goal: Administer COM+ applications on remote computers.</p>
<p>Problem: Windows firewall on the remote computer blocks the connection.</p>
<p>Solution: Set up the firewall to accept dynamic RPC ports.</p>
<p>The most relevant article to this topic is available <a href="http://support.microsoft.com/kb/154596/">here</a>.</p>
<p>I searched Google for an hour, and could not find anywhere that somebody had documented how to set up a firewall to allow remote administration  of COM+ Applications. The Component Services snap-in lets you add another computer. If that computer has the basic Windows Firewall active, you will not be able to connect to or see anything on the other computer. This is indicated by a nice red arrow on the icon for the remote computer.</p>
<p>Component Services uses dynamic RPC ports to communicate with other computers. The article describes how to restrict the ports that RPC uses.</p>
<p>I used the rpccfg.exe tool from the resource kit. A link to download it is in the support article. This is run on the remote PC. I used it to restrict RPC to ports 5001-5100.</p>
<p>The next problem was how to tell the Windows Firewall to allow these ports through from the administration PC. Windows Firewall does not allow port ranges in the exceptions. <a href="http://www.microsoft.com/windowsserver2003/technologies/management/powershell/default.mspx">Powershell</a> to the rescue! The following Powershell script set up exceptions for each port:</p>
<pre>PS C:\&gt; 5001..5100 | % { `
netsh firewall add portopening `
protocol = TCP port = $_ `
name = "Remote admin RPC $_" `
scope = CUSTOM addresses = 192.168.1.111}</pre>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/hurcane.wordpress.com/208/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/hurcane.wordpress.com/208/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hurcane.wordpress.com/208/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hurcane.wordpress.com/208/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hurcane.wordpress.com/208/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hurcane.wordpress.com/208/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hurcane.wordpress.com/208/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hurcane.wordpress.com/208/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hurcane.wordpress.com/208/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hurcane.wordpress.com/208/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hurcane.wordpress.com/208/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hurcane.wordpress.com/208/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hurcane.wordpress.com/208/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hurcane.wordpress.com/208/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hurcane.wordpress.com/208/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hurcane.wordpress.com/208/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hurcane.wordpress.com&amp;blog=220718&amp;post=208&amp;subd=hurcane&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hurcane.wordpress.com/2008/06/11/remote-administration-of-com-through-a-firewall/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b51e10f5987a69e055d9e5540ee97892?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hurcane</media:title>
		</media:content>
	</item>
		<item>
		<title>Nullable types and boolean comparisons</title>
		<link>http://hurcane.wordpress.com/2008/01/03/nullable-types-and-boolean-comparisons/</link>
		<comments>http://hurcane.wordpress.com/2008/01/03/nullable-types-and-boolean-comparisons/#comments</comments>
		<pubDate>Fri, 04 Jan 2008 03:09:14 +0000</pubDate>
		<dc:creator>hurcane</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://hurcane.wordpress.com/2008/01/03/nullable-types-and-boolean-comparisons/</guid>
		<description><![CDATA[I&#8217;ve begun studying to take the 70-536 exam. I read about Nullable types in my study material and decided to review MSDN&#8217;s topic on the subject. The documentation includes a complicated truth table regarding tri-state boolean logic. Here&#8217;s how I think of it, without having to worry about looking up the value in a large [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hurcane.wordpress.com&amp;blog=220718&amp;post=206&amp;subd=hurcane&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve begun studying to take the 70-536 exam. I read about Nullable types in my study material and decided to review MSDN&#8217;s topic on the subject. The documentation includes a complicated truth table regarding tri-state boolean logic.</p>
<p>Here&#8217;s how I think of it, without having to worry about looking up the value in a large truth table.</p>
<p>And comparisons:</p>
<ul>
<li>True: Both operators are true</li>
<li>False: Either operator is false</li>
<li>Nothing/Null: Any other combination.</li>
</ul>
<p>Or comparisons:</p>
<ul>
<li>True: Either operator is true</li>
<li>False: Both operators are false</li>
<li>Nothing/Null: Any other combination.</li>
</ul>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/hurcane.wordpress.com/206/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/hurcane.wordpress.com/206/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hurcane.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hurcane.wordpress.com/206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hurcane.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hurcane.wordpress.com/206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hurcane.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hurcane.wordpress.com/206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hurcane.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hurcane.wordpress.com/206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hurcane.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hurcane.wordpress.com/206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hurcane.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hurcane.wordpress.com/206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hurcane.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hurcane.wordpress.com/206/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hurcane.wordpress.com&amp;blog=220718&amp;post=206&amp;subd=hurcane&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hurcane.wordpress.com/2008/01/03/nullable-types-and-boolean-comparisons/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b51e10f5987a69e055d9e5540ee97892?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hurcane</media:title>
		</media:content>
	</item>
		<item>
		<title>John Philip Sousa at Interlochen</title>
		<link>http://hurcane.wordpress.com/2007/11/30/john-philip-sousa-at-interlochen/</link>
		<comments>http://hurcane.wordpress.com/2007/11/30/john-philip-sousa-at-interlochen/#comments</comments>
		<pubDate>Sat, 01 Dec 2007 03:49:27 +0000</pubDate>
		<dc:creator>hurcane</dc:creator>
				<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://hurcane.wordpress.com/2007/11/30/john-philip-sousa-at-interlochen/</guid>
		<description><![CDATA[Recently, my brass quintet did a performance at a senior center in honor of Veterans Day. We opened the concert with Under the Double Eagle, by J. F. Wagner. I explained that this march was a favorite of John Philip Sousa. We closed the performance with Semper Fidelis, by John Philip Sousa. After the performance, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hurcane.wordpress.com&amp;blog=220718&amp;post=205&amp;subd=hurcane&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Recently, my brass quintet did a performance at a senior center in honor of <a href="http://www1.va.gov/opa/vetsday/" target="_blank">Veterans Day</a>. We opened the concert with <em>Under the Double Eagle</em>, by J. F. Wagner. I explained that this march was a favorite of John Philip Sousa. We closed the performance with <em>Semper Fidelis</em>, by John Philip Sousa.</p>
<p>After the performance, one of the residents at the center came up and told an interesting story. I don&#8217;t know if it is true, but I thought it was a nice story.</p>
<p>The resident told us she was a violin student at <a href="http://www.interlochen.org/" target="_blank">Interlochen</a> in 1930. Interlochen was founded only a few years earlier, and construction on the campus was not yet complete. In particular, one of the performance venues was going to have an organ, but it was not ready yet. John Philip Sousa visited Interlochen while she was there, and apparently he was distressed because there was no organ.</p>
<p>According to the story, Sousa put out a letter requesting saxophone players. The response was overwhelming, and 75 saxophonists came to Interlochen. They played for a grand concert with Sousa, and they sounded just like an organ!</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/hurcane.wordpress.com/205/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/hurcane.wordpress.com/205/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hurcane.wordpress.com/205/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hurcane.wordpress.com/205/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hurcane.wordpress.com/205/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hurcane.wordpress.com/205/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hurcane.wordpress.com/205/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hurcane.wordpress.com/205/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hurcane.wordpress.com/205/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hurcane.wordpress.com/205/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hurcane.wordpress.com/205/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hurcane.wordpress.com/205/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hurcane.wordpress.com/205/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hurcane.wordpress.com/205/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hurcane.wordpress.com/205/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hurcane.wordpress.com/205/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hurcane.wordpress.com&amp;blog=220718&amp;post=205&amp;subd=hurcane&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hurcane.wordpress.com/2007/11/30/john-philip-sousa-at-interlochen/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b51e10f5987a69e055d9e5540ee97892?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hurcane</media:title>
		</media:content>
	</item>
		<item>
		<title>Lambda is the new nuclear</title>
		<link>http://hurcane.wordpress.com/2007/11/27/lambda-is-the-new-nuclear/</link>
		<comments>http://hurcane.wordpress.com/2007/11/27/lambda-is-the-new-nuclear/#comments</comments>
		<pubDate>Tue, 27 Nov 2007 16:34:47 +0000</pubDate>
		<dc:creator>hurcane</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://hurcane.wordpress.com/2007/11/27/lambda-is-the-new-nuclear/</guid>
		<description><![CDATA[I was listening to the latest Polymorphic Podcast, and I had to laugh when Craig Shoemaker mentioned lambda expressions. He pronounced lambda as &#8220;lam-bah-da&#8221;. It made me want to get up and dance. I wonder how common it is to add an extra syllable, like saying &#8220;nu-ku-ler&#8221; instead of &#8220;nu-clear&#8221;?<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hurcane.wordpress.com&amp;blog=220718&amp;post=204&amp;subd=hurcane&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I was listening to the <a href="http://polymorphicpodcast.com/shows/hanselman/" target="_blank">latest</a> <a href="http://polymorphicpodcast.com/" target="_blank">Polymorphic Podcast</a>, and I had to laugh when Craig Shoemaker mentioned lambda expressions. He pronounced lambda as &#8220;lam-bah-da&#8221;. It made me want to get up and <a href="http://en.wikipedia.org/wiki/Lambada" target="_blank">dance</a>.</p>
<p>I  wonder how common it is to add an extra syllable, like saying &#8220;nu-ku-ler&#8221; instead of &#8220;nu-clear&#8221;?</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/hurcane.wordpress.com/204/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/hurcane.wordpress.com/204/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hurcane.wordpress.com/204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hurcane.wordpress.com/204/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hurcane.wordpress.com/204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hurcane.wordpress.com/204/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hurcane.wordpress.com/204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hurcane.wordpress.com/204/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hurcane.wordpress.com/204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hurcane.wordpress.com/204/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hurcane.wordpress.com/204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hurcane.wordpress.com/204/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hurcane.wordpress.com/204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hurcane.wordpress.com/204/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hurcane.wordpress.com/204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hurcane.wordpress.com/204/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hurcane.wordpress.com&amp;blog=220718&amp;post=204&amp;subd=hurcane&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hurcane.wordpress.com/2007/11/27/lambda-is-the-new-nuclear/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b51e10f5987a69e055d9e5540ee97892?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hurcane</media:title>
		</media:content>
	</item>
		<item>
		<title>Nine Things Developers Want More Than Money</title>
		<link>http://hurcane.wordpress.com/2007/06/07/nine-things-developers-want-more-than-money/</link>
		<comments>http://hurcane.wordpress.com/2007/06/07/nine-things-developers-want-more-than-money/#comments</comments>
		<pubDate>Fri, 08 Jun 2007 03:00:17 +0000</pubDate>
		<dc:creator>hurcane</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://hurcane.wordpress.com/2007/06/07/nine-things-developers-want-more-than-money/</guid>
		<description><![CDATA[I recently ran across this older post about Nine Things Developers Want More Than Money. I can relate to items 3, 4, 5, 7, 8, and 9. I&#8217;m fortunate to have most of those things in my work environment, except for #9. I&#8217;m working on a project that interfaces new work in VB.NET with existing [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hurcane.wordpress.com&amp;blog=220718&amp;post=192&amp;subd=hurcane&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I recently ran across this older post about <a href="http://www.softwarebyrob.com/articles/Nine_Things_Developers_Want_More_Than_Money.aspx">Nine Things Developers Want More Than Money</a>. I can relate to items 3, 4, 5, 7, 8, and 9. I&#8217;m fortunate to have most of those things in my work environment, except for #9. I&#8217;m working on a project that interfaces new work in VB.NET with existing work that was done in VB6 several years ago. I wrote most of the code on both ends, and I curse myself at least once a week for being so ignorant when I wrote the VB6 code several years ago. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/hurcane.wordpress.com/192/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/hurcane.wordpress.com/192/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hurcane.wordpress.com/192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hurcane.wordpress.com/192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hurcane.wordpress.com/192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hurcane.wordpress.com/192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hurcane.wordpress.com/192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hurcane.wordpress.com/192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hurcane.wordpress.com/192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hurcane.wordpress.com/192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hurcane.wordpress.com/192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hurcane.wordpress.com/192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hurcane.wordpress.com/192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hurcane.wordpress.com/192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hurcane.wordpress.com/192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hurcane.wordpress.com/192/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hurcane.wordpress.com&amp;blog=220718&amp;post=192&amp;subd=hurcane&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hurcane.wordpress.com/2007/06/07/nine-things-developers-want-more-than-money/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b51e10f5987a69e055d9e5540ee97892?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hurcane</media:title>
		</media:content>
	</item>
		<item>
		<title>Using Tracepoints in VB.NET</title>
		<link>http://hurcane.wordpress.com/2007/06/06/using-tracepoints-in-vbnet/</link>
		<comments>http://hurcane.wordpress.com/2007/06/06/using-tracepoints-in-vbnet/#comments</comments>
		<pubDate>Thu, 07 Jun 2007 03:00:13 +0000</pubDate>
		<dc:creator>hurcane</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://hurcane.wordpress.com/2007/06/06/using-tracepoints-in-vbnet/</guid>
		<description><![CDATA[I recently ran across Kate Gregory&#8217;s post on tracepoints. She&#8217;s a C# person, but this technique works in Visual Basic.NET, too. I did have a problem getting the results to print in my Debug window, as Kate shows on her post. VB.NET has an option to send Debugging information to the Immediate Window, rather than [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hurcane.wordpress.com&amp;blog=220718&amp;post=10&amp;subd=hurcane&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I recently ran across <a href="http://www.gregcons.com/KateBlog/PermaLink.aspx?guid=c5590e77-c53e-4a2a-a632-80e10fe611bb">Kate Gregory&#8217;s post on tracepoints</a>. She&#8217;s a C# person, but this technique works in Visual Basic.NET, too.</p>
<p>I did have a problem getting the results to print in my Debug window, as Kate shows on her post. VB.NET has an option to send Debugging information to the Immediate Window, rather than to the Output window. Until I knew this, I was looking for the information in the wrong place.</p>
<p>To change this behavior, select Tools -&gt; Options from the menu. Make sure &#8220;Show all settings is checked&#8221;. The Debugging/General node has an option, &#8220;Redirect all Output Window text to the Immediate Window.&#8221; I have turned this option off, as I never use the Immediate Window in VB.NET.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/hurcane.wordpress.com/10/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/hurcane.wordpress.com/10/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hurcane.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hurcane.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hurcane.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hurcane.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hurcane.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hurcane.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hurcane.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hurcane.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hurcane.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hurcane.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hurcane.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hurcane.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hurcane.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hurcane.wordpress.com/10/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hurcane.wordpress.com&amp;blog=220718&amp;post=10&amp;subd=hurcane&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hurcane.wordpress.com/2007/06/06/using-tracepoints-in-vbnet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b51e10f5987a69e055d9e5540ee97892?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hurcane</media:title>
		</media:content>
	</item>
		<item>
		<title>AddWithValue with Parameterized SQL Gotcha</title>
		<link>http://hurcane.wordpress.com/2007/06/05/addwithvalue-with-parameterized-sql-gotcha/</link>
		<comments>http://hurcane.wordpress.com/2007/06/05/addwithvalue-with-parameterized-sql-gotcha/#comments</comments>
		<pubDate>Wed, 06 Jun 2007 03:00:44 +0000</pubDate>
		<dc:creator>hurcane</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://hurcane.wordpress.com/2007/06/05/addwithvalue-with-parameterized-sql-gotcha/</guid>
		<description><![CDATA[With Visual Studio 2005, the SQLParameterCollection got a new method, AddWithValue. This method is very handy when executing stored procedures. You need to be careful about using this with dynamic SQL and parameterized SELECT statements. You could end up with very poor performance on your dynamic SQL queries. Suppose you have a flexible inquiry form [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hurcane.wordpress.com&amp;blog=220718&amp;post=7&amp;subd=hurcane&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>With Visual Studio 2005, the SQLParameterCollection got a new method, AddWithValue. This method is very handy when executing stored procedures. You need to be careful about using this with dynamic SQL and parameterized SELECT statements.  You could end up with very poor performance on your dynamic SQL queries.</p>
<p>Suppose you have a flexible inquiry form that is generating dynamic SQL to find order lines that match an optional set of critera that the user has filled in on a form. The parameters are used to build a custom WHERE clause based on the criteria the user selected.</p>
<p>If the criteria in the database are dates or numbers, you may end up with a very inefficient query when you use the AddWithValue method to create the parameters. By default, the generated SQL will set these parameters to an nvarchar data type. When the SQL runs, the server is expected to convert the nvarchar parameter to the other data type. For numbers and dates, this will prevent the use of an index seek.</p>
<p>Instead, use the standard Add method, which allows you to define the data type of the parameter.  Here&#8217;s a VB example:</p>
<p>cmd.Parameters.Add(&#8220;@OrderQuantity&#8221;, SqlDbType.Decimal).Value = myValue</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/hurcane.wordpress.com/7/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/hurcane.wordpress.com/7/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hurcane.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hurcane.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hurcane.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hurcane.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hurcane.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hurcane.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hurcane.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hurcane.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hurcane.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hurcane.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hurcane.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hurcane.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hurcane.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hurcane.wordpress.com/7/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hurcane.wordpress.com&amp;blog=220718&amp;post=7&amp;subd=hurcane&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hurcane.wordpress.com/2007/06/05/addwithvalue-with-parameterized-sql-gotcha/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b51e10f5987a69e055d9e5540ee97892?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hurcane</media:title>
		</media:content>
	</item>
	</channel>
</rss>
