<?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/"
	>

<channel>
	<title>Rick Caminiti dotCOM &#187; Short-Circuiting in C# with OrElse Operator &#8211; Rick Caminiti dotCom</title>
	<atom:link href="http://rickcaminiti.com/category/g33k/feed/" rel="self" type="application/rss+xml" />
	<link>http://rickcaminiti.com</link>
	<description>Me, Myself, and IT</description>
	<lastBuildDate>Sat, 19 Mar 2011 03:35:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Short-Circuiting in C# with OrElse Operator</title>
		<link>http://rickcaminiti.com/tips/shortcircuiting-orelse-operator/</link>
		<comments>http://rickcaminiti.com/tips/shortcircuiting-orelse-operator/#comments</comments>
		<pubDate>Fri, 12 Jun 2009 20:33:07 +0000</pubDate>
		<dc:creator>NothingMan</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[g33k]]></category>

		<guid isPermaLink="false">http://rickcaminiti.com/?p=366</guid>
		<description><![CDATA[I&#8217;d heard about short-circuiting before but had never seen it actually applied.  I guess the main benefit of the OrElse operator is that it can improve performance if the &#8220;bypassed&#8221; condition is cumbersome.  It&#8217;s basically an OR statement, but if the first expression evaluates as TRUE, it doesn&#8217;t need to evaluate the second expression.  Normally, [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;d heard about short-circuiting before but had never seen it actually applied.  I guess the main benefit of the OrElse operator is that it can improve performance if the &#8220;bypassed&#8221; condition is cumbersome.  It&#8217;s basically an OR statement, but if the first expression evaluates as TRUE, it doesn&#8217;t need to evaluate the second expression.  Normally, both expressions would be evaulated, but in reality, if the first one is TRUE, the whole condition is TRUE, so why evaluate the second one, right?</p>
<p><code>
<dt><em>result</em> </dt>
<dd>Required. Any <strong>Boolean</strong> expression. </dd>
<dt><em>expression1</em> </dt>
<dd>Required. Any <strong>Boolean</strong> expression. </dd>
<dt><em>expression2</em> </dt>
<dd>Required. Any <strong>Boolean</strong> expression. </dd>
<dd></dd>
<p></code></p>
<table border="0">
<tbody>
<tr valign="top">
<th width="26%">If <em>expression1</em> is</th>
<th width="30%">And <em>expression2</em> is</th>
<th width="44%">Then <em>result</em> is</th>
</tr>
<tr valign="top">
<td width="26%"><strong>True</strong></td>
<td width="30%">(not evaluated)</td>
<td width="44%"><strong>True</strong></td>
</tr>
<tr valign="top">
<td width="26%"><strong>False</strong></td>
<td width="30%"><strong>True</strong></td>
<td width="44%"><strong>True</strong></td>
</tr>
<tr valign="top">
<td width="26%"><strong>False</strong></td>
<td width="30%"><strong>False</strong></td>
<td width="44%"><strong>False</strong></td>
</tr>
</tbody>
</table>
<p>It&#8217;s this simple:</p>
<p><code>Dim A As Integer = 10<br />
Dim B As Integer = 8<br />
Dim C As Integer = 6<br />
Dim myCheck As Boolean<br />
myCheck = A &gt; B OrElse B &gt; C   ' True. Second expression is not evaluated.<br />
myCheck = B &gt; A OrElse B &gt; C   ' True. Second expression is evaluated.<br />
myCheck = B &gt; A OrElse C &gt; B   ' False.</p>
<p>If MyFunction(5) = True OrElse MyOtherFunction(4) = True Then<br />
' If MyFunction(5) is True, MyOtherFunction(4) is not called.<br />
   ' Insert code to be executed.<br />
End If</code></p>
]]></content:encoded>
			<wfw:commentRss>http://rickcaminiti.com/tips/shortcircuiting-orelse-operator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WTF is an Enum?</title>
		<link>http://rickcaminiti.com/code/wtf-enum/</link>
		<comments>http://rickcaminiti.com/code/wtf-enum/#comments</comments>
		<pubDate>Thu, 04 Jun 2009 14:01:19 +0000</pubDate>
		<dc:creator>NothingMan</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[g33k]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[dotNet]]></category>
		<category><![CDATA[enum]]></category>
		<category><![CDATA[wtf]]></category>

		<guid isPermaLink="false">http://rickcaminiti.com/?p=348</guid>
		<description><![CDATA[I&#8217;m a data-person but I like to change it up every now and then jump into some real code.  I was dabbling in C# last week and was looking into Enums.  I had heard about them a lot but never REALLY knew what they were or how they were constructed, so I forced myself to [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m a data-person but I like to change it up every now and then jump into some real code.  I was dabbling in C# last week and was looking into Enums.  I had heard about them a lot but never REALLY knew what they were or how they were constructed, so I forced myself to figure out WTF they were.</p>
<p> </p>
<p>In <a title="Computer programming" href="http://rickcaminiti.com/wiki/Computer_programming">computer programming</a>, an <strong>enumerated type</strong> (also called <strong>enumeration</strong> or <strong>enum</strong>) is a <a title="Data type" href="http://rickcaminiti.com/wiki/Data_type">data type</a> consisting of a set of named <a title="Value (computer science)" href="http://rickcaminiti.com/wiki/Value_(computer_science)">values</a> called <strong>elements</strong>, <strong>members</strong> or <strong>enumerators</strong> of the type. The enumerator names are usually <a title="Identifier" href="http://rickcaminiti.com/wiki/Identifier">identifiers</a> that behave as <a title="Constant (programming)" href="http://rickcaminiti.com/wiki/Constant_(programming)">constants</a> in the language. A <a class="mw-redirect" title="Variable (computer science)" href="http://rickcaminiti.com/wiki/Variable_(computer_science)">variable</a> that has been <a title="Declaration (computer science)" href="http://rickcaminiti.com/wiki/Declaration_(computer_science)">declared</a> as having an enumerated type can be assigned any of the enumerators as a value.</p>
<p>For example, the four suits in a deck of playing cards may be four enumerators named <em>CLUB</em>, <em>DIAMOND</em>, <em>HEART</em>, <em>SPADE</em>, belonging to an enumerated type named <em>suits</em>. If a variable <em>V</em> is declared having <em>suits</em> as its data type, one can assign any of those four values to it.</p>
<p>The enumerators are necessarily distinct, even though some languages may allow the same enumerator to be listed twice in the type&#8217;s declaration. The enumerators need not be complete or compatible in any sense. For example, an enumerated type called <em>color</em> may be defined to consist of the enumerators <em>RED</em>, <em>GREEN</em>, <em>ZEBRA</em>, and <em>MISSING</em>. In some languages, the declaration of an enumerated type also defines an <a title="Total order" href="http://rickcaminiti.com/wiki/Total_order">ordering</a> of its members.</p>
<p>Some enumerator types may be <a class="mw-redirect" title="Built-in type" href="http://rickcaminiti.com/wiki/Built-in_type">built into</a> the language. The <a class="mw-redirect" title="Boolean type" href="http://rickcaminiti.com/wiki/Boolean_type">Boolean type</a>, for example is often a pre-defined enumeration of the values <em>FALSE</em> and <em>TRUE</em>. Many languages allow the user to define new enumerated types.</p>
<p> </p>
<p>Here&#8217;s a quick look at how to create an Enum and how to use them.<br />
<code><br />
<span style="font-size: 10pt; color: blue; font-family: Verdana;">using</span><span style="font-size: 10pt; font-family: Verdana;"> System;</p>
<p><span style="color: green;">// declares the enum<br />
</span><span style="color: blue;">public</span> <span style="color: blue;">enum</span> Volume<br />
{<br />
   Low,<br />
   Medium,<br />
   High<br />
}<br />
<span style="color: green;"><br />
// demonstrates how to use the enum<br />
</span><span style="color: blue;"><br />
class</span> EnumSwitch<br />
{<br />
<span style="color: blue;">   static</span> <span style="color: blue;">void</span> Main()<br />
   {<br />
<span style="color: green;">      // create and initialize <br />
      // instance of enum type</span><br />
      Volume myVolume = Volume.Medium;<br />
<span style="color: green;"><br />
      // make decision based<br />
      // on enum value<br />
</span><span style="color: blue;">      switch</span> (myVolume)<br />
      {<br />
<span style="color: blue;">         case</span> Volume.Low:<br />
            Console.WriteLine("The volume has been turned Down.");<br />
<span style="color: blue;">            break</span>;<br />
<span style="color: blue;">         case</span> Volume.Medium:<br />
            Console.WriteLine("The volume is in the middle.");<br />
<span style="color: blue;">            break</span>;<br />
<span style="color: blue;">         case</span> Volume.High:<br />
            Console.WriteLine("The volume has been turned up.");<br />
<span style="color: blue;">            break</span>;<br />
      }<br />
      Console.ReadLine();<br />
   }<br />
}</span><span style="font-family: Verdana;"><span style="font-size: small;"> </span></span><br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://rickcaminiti.com/code/wtf-enum/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Geocoding in SSIS</title>
		<link>http://rickcaminiti.com/misc/google-geocoding-ssis/</link>
		<comments>http://rickcaminiti.com/misc/google-geocoding-ssis/#comments</comments>
		<pubDate>Wed, 20 May 2009 17:46:18 +0000</pubDate>
		<dc:creator>NothingMan</dc:creator>
				<category><![CDATA[BI]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Misc]]></category>
		<category><![CDATA[g33k]]></category>
		<category><![CDATA[geocode]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[ssis]]></category>

		<guid isPermaLink="false">http://rickcaminiti.com/?p=337</guid>
		<description><![CDATA[I have an old YouTube tutorial on how to use Google Geocoding within SSIS, but I lost all the downloadable scripts.  I recently had a few people asking me if I could send them the scripts, so I deiceded to rewrite them. Again, you can check out the YouTub video (it&#8217;s rough) for more details, just [...]]]></description>
			<content:encoded><![CDATA[<p>I have an old YouTube tutorial on how to use Google Geocoding within SSIS, but I lost all the downloadable scripts.  I recently had a few people asking me if I could send them the scripts, so I deiceded to rewrite them.</p>
<p>Again, you can check out the YouTub video (it&#8217;s rough) for more details, just go to <a href="http://www.youtube.com/watch?v=HTSHzR-wSgc">http://www.youtube.com/watch?v=HTSHzR-wSgc</a> with this DISCLAIMER:  This code was just thrown together and is quite ugly and my microphone was terrible, I usually sound much better than that <img src='http://rickcaminiti.com/wp-includes/images/smilies/icon_smile.gif' alt="Google Geocoding in SSIS" class='wp-smiley' title="Google Geocoding in SSIS photo" />  :-)</p>
<p>In a nutshell, I sniped about 18,000 golfcourses off the web with a PHP script and got basic course information for all of them, including the address information.  I wanted to use Google Maps to display these courses, so I thought I&#8217;d use Google Geocoding.  Caution, they don&#8217;t like it when you hit them 1000 times per second, so I would recommend using a <a title="Putting VB.Net 2008 to Sleep" href="http://rickcaminiti.com/tips/putting-vbnet-2008-to-sleep/" target="_self">Sleep command </a>in your code like I did so you can throttle it without getting kicked off. </p>
<p>So, I have an OLE Source task that reads from my database.  I created a Derived Column task to create placeholders for latitude, longitude, and level of accuracy.  I created a Script Component and selected street, city, state, and zip as input columns and added lat, long, and accuracy as read/write columns. </p>
<p>Open the script editor, add a reference to System.Web, then create a new class called Google GeoCode, or whatever the heck you want to call it and paste in this code:</p>
<div><code><span style="font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;; mso-no-proof: yes;">Option</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"> <span style="color: blue;">Strict</span> <span style="color: blue;">Off</span></span></code></div>
<p><code></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; color: green; font-family: &quot;Courier New&quot;; mso-no-proof: yes;">''' Might need this, might not</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;; mso-no-proof: yes;">Imports</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"> System</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;; mso-no-proof: yes;">Imports</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"> System.Data</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;; mso-no-proof: yes;">Imports</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"> System.Math</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;; mso-no-proof: yes;">Imports</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"> System.Net</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;; mso-no-proof: yes;">Imports</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"> System.Web</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;; mso-no-proof: yes;">Imports</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"> System.IO</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;; mso-no-proof: yes;">Namespace</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"> GoogleGeoCoder</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">    </span><span style="color: blue;">Public</span> <span style="color: blue;">Interface</span> ISpatialCoordinate</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">        </span><span style="color: blue;">Property</span> latitude() <span style="color: blue;">As</span> <span style="color: blue;">Double</span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">        </span><span style="color: blue;">Property</span> longitude() <span style="color: blue;">As</span> <span style="color: blue;">Double</span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;"> </span><span style="mso-spacerun: yes;">   </span><span style="color: blue;">End</span> <span style="color: blue;">Interface</span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">    </span><span style="color: green;">''' &lt;summary&gt;<span style="mso-spacerun: yes;">    </span></span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">    </span><span style="color: green;">''' Coordiate structure. Holds Latitude and Longitude.<span style="mso-spacerun: yes;">    </span></span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">    </span><span style="color: green;">''' &lt;/summary&gt;<span style="mso-spacerun: yes;">    </span></span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">    </span><span style="color: blue;">Public</span> <span style="color: blue;">Structure</span> Coordinate</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">        </span><span style="color: blue;">Implements</span> ISpatialCoordinate</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"> </span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">        </span><span style="color: blue;">Private</span> _latitude <span style="color: blue;">As</span> <span style="color: blue;">Double</span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">        </span><span style="color: blue;">Private</span> _longitude <span style="color: blue;">As</span> <span style="color: blue;">Double</span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"> </span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">        </span><span style="color: blue;">Public</span> <span style="color: blue;">Sub</span> <span style="color: blue;">New</span>(<span style="color: blue;">ByVal</span> lattitude <span style="color: blue;">As</span> <span style="color: blue;">Double</span>, <span style="color: blue;">ByVal</span> longitude <span style="color: blue;">As</span> <span style="color: blue;">Double</span>)</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">            </span>_latitude = lattitude</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">            </span>_longitude = longitude</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">        </span><span style="color: blue;">End</span> <span style="color: blue;">Sub</span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"> </span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">        </span><span style="color: blue;">Public</span> <span style="color: blue;">Property</span> latitude() <span style="color: blue;">As</span> <span style="color: blue;">Double</span> <span style="color: blue;">Implements</span> ISpatialCoordinate.latitude</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">            </span><span style="color: blue;">Get</span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">                </span><span style="color: blue;">Return</span> _latitude</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">            </span><span style="color: blue;">End</span> <span style="color: blue;">Get</span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">            </span><span style="color: blue;">Set</span>(<span style="color: blue;">ByVal</span> value <span style="color: blue;">As</span> <span style="color: blue;">Double</span>)</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">                </span>_latitude = value</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">            </span><span style="color: blue;">End</span> <span style="color: blue;">Set</span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">        </span><span style="color: blue;">End</span> <span style="color: blue;">Property</span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"> </span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">        </span><span style="color: blue;">Public</span> <span style="color: blue;">Property</span> longitude() <span style="color: blue;">As</span> <span style="color: blue;">Double</span> <span style="color: blue;">Implements</span> ISpatialCoordinate.longitude</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">            </span><span style="color: blue;">Get</span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">                </span><span style="color: blue;">Return</span> _longitude</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">            </span><span style="color: blue;">End</span> <span style="color: blue;">Get</span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">            </span><span style="color: blue;">Set</span>(<span style="color: blue;">ByVal</span> value <span style="color: blue;">As</span> <span style="color: blue;">Double</span>)</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">                </span>_longitude = value</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">            </span><span style="color: blue;">End</span> <span style="color: blue;">Set</span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">        </span><span style="color: blue;">End</span> <span style="color: blue;">Property</span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"> </span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">    </span><span style="color: blue;">End</span> <span style="color: blue;">Structure</span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">    </span><span style="color: blue;">Public</span> <span style="color: blue;">Class</span> GeoCode</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">        </span><span style="color: blue;">Const</span> _googleUri <span style="color: blue;">As</span> <span style="color: blue;">String</span> = <span style="color: maroon;">"http://maps.google.com/maps/geo?q="</span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">        </span><span style="color: blue;">Const</span> _googleKey <span style="color: blue;">As</span> <span style="color: blue;">String</span> = <span style="color: maroon;">"yourgooglekeyhere"</span><span style="mso-spacerun: yes;">  </span><span style="color: green;">' get your own<span style="mso-spacerun: yes;">        </span></span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">        </span><span style="color: blue;">Const</span> _outputType <span style="color: blue;">As</span> <span style="color: blue;">String</span> = <span style="color: maroon;">"csv"</span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">        </span><span style="color: blue;">Private</span> <span style="color: blue;">Shared</span> <span style="color: blue;">Function</span> GetGeoCodeUri(<span style="color: blue;">ByVal</span> address <span style="color: blue;">As</span> <span style="color: blue;">String</span>) <span style="color: blue;">As</span> Uri</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">            </span>address = HttpUtility.UrlEncode(address)</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">            </span><span style="color: blue;">Return</span> <span style="color: blue;">New</span> Uri(<span style="color: blue;">String</span>.Format(<span style="color: maroon;">"{0}{1}&amp;output={2}&amp;key={3}"</span>, _googleUri, address, _outputType, _googleKey))</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">        </span><span style="color: blue;">End</span> <span style="color: blue;">Function</span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">        </span><span style="color: green;">''' &lt;summary&gt;<span style="mso-spacerun: yes;">        </span></span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">        </span><span style="color: green;">''' Gets a Coordinate from a address.<span style="mso-spacerun: yes;">        </span></span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">        </span><span style="color: green;">''' &lt;/summary&gt;<span style="mso-spacerun: yes;">        </span></span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">        </span><span style="color: green;">''' &lt;param name="address"&gt;An address.<span style="mso-spacerun: yes;">        </span></span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">        </span><span style="color: green;">''' &lt;remarks&gt;<span style="mso-spacerun: yes;">        </span></span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">        </span><span style="color: green;">''' &lt;example&gt;1600 Amphitheatre Parkway Mountain View, CA 94043&lt;/example&gt;<span style="mso-spacerun: yes;">        </span></span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">        </span><span style="color: green;">''' &lt;/remarks&gt;<span style="mso-spacerun: yes;">        </span></span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">        </span><span style="color: green;">''' &lt;/param&gt;<span style="mso-spacerun: yes;">        </span></span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">        </span><span style="color: green;">''' &lt;returns&gt;A spatial coordinate that contains the latitude and longitude of the address.&lt;/returns&gt;<span style="mso-spacerun: yes;">        </span></span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">        </span><span style="color: blue;">Public</span> <span style="color: blue;">Shared</span> <span style="color: blue;">Function</span> GetCoordinates(<span style="color: blue;">ByVal</span> address <span style="color: blue;">As</span> <span style="color: blue;">String</span>) <span style="color: blue;">As</span> Coordinate</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">            </span><span style="color: blue;">Dim</span> client <span style="color: blue;">As</span> WebClient = <span style="color: blue;">New</span> WebClient()</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">            </span><span style="color: blue;">Dim</span> uri <span style="color: blue;">As</span> Uri = GetGeoCodeUri(address)</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">            </span><span style="color: blue;">Dim</span> geoCodeInfo <span style="color: blue;">As</span> <span style="color: blue;">String</span>()</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">            </span><span style="color: green;">'The first number is the status code,<span style="mso-spacerun: yes;">             </span></span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">            </span><span style="color: green;">'the second is the accuracy,<span style="mso-spacerun: yes;">             </span></span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">       </span><span style="mso-spacerun: yes;">     </span><span style="color: green;">'the third is the latitude,<span style="mso-spacerun: yes;">             </span></span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">            </span><span style="color: green;">'the fourth one is the longitude.<span style="mso-spacerun: yes;">            </span></span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">            </span><span style="color: blue;">Try</span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">                </span>geoCodeInfo = client.DownloadString(uri).Split(<span style="color: maroon;">","</span>)</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">                </span><span style="color: blue;">Return</span> <span style="color: blue;">New</span> Coordinate(Convert.ToDouble(geoCodeInfo(2)), Convert.ToDouble(geoCodeInfo(3)))</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">            </span><span style="color: blue;">Catch</span> ex <span style="color: blue;">As</span> Exception</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">                </span><span style="color: blue;">Return</span> <span style="color: blue;">New</span> Coordinate(0.0, 0.0)</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">            </span><span style="color: blue;">End</span> <span style="color: blue;">Try</span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">        </span><span style="color: blue;">End</span> <span style="color: blue;">Function</span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">    </span><span style="color: blue;">End</span> <span style="color: blue;">Class</span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;; mso-no-proof: yes;">End</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"> <span style="color: blue;">Namespace</span></span></p>
<p></code></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"> </p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;">Save it and then go back to the main script and add Import that class (see code).  Notice, the way I&#8217;m getting the level of accuracy with my ugly nested IF statements isn&#8217;t the prettiest way to do this, use your imagination.  Copy in this code into the Main Script:</p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"> </p>
<p><code></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; color: green; font-family: &quot;Courier New&quot;; mso-no-proof: yes;">' Microsoft SQL Server Integration Services user script component</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; color: green; font-family: &quot;Courier New&quot;; mso-no-proof: yes;">' This is your new script component in Microsoft Visual Basic .NET</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; color: green; font-family: &quot;Courier New&quot;; mso-no-proof: yes;">' ScriptMain is the entrypoint class for script components</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; color: green; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"> </span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;; mso-no-proof: yes;">Imports</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"> System</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;; mso-no-proof: yes;">Imports</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"> System.Data</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;; mso-no-proof: yes;">Imports</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"> System.Math</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;; mso-no-proof: yes;">Imports</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"> Microsoft.SqlServer.Dts.Pipeline.Wrapper</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;; mso-no-proof: yes;">Imports</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"> Microsoft.SqlServer.Dts.Runtime.Wrapper</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;; mso-no-proof: yes;">Imports</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"> ScriptComponent_4a8732cababc49a999159a91c737082a.GoogleGeoCoder</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"> </span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;; mso-no-proof: yes;">Public</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"> <span style="color: blue;">Class</span> ScriptMain</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">    </span><span style="color: blue;">Inherits</span> UserComponent</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"> </span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">    </span><span style="color: blue;">Public</span> <span style="color: blue;">Overrides</span> <span style="color: blue;">Sub</span> Input0_ProcessInputRow(<span style="color: blue;">ByVal</span> Row <span style="color: blue;">As</span> Input0Buffer)</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"> </span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">        </span><span style="color: blue;">Dim</span> coordinate <span style="color: blue;">As</span> Coordinate = GeoCode.GetCoordinates(Row.street &amp; <span style="color: maroon;">", "</span> &amp; Row.city &amp; <span style="color: maroon;">", "</span> &amp; Row.state &amp; <span style="color: maroon;">", "</span> &amp; Row.zip)</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"> </span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">        </span><span style="color: blue;">If</span> ((coordinate.latitude &lt;&gt; 0) <span style="color: blue;">And</span> (coordinate.longitude &lt;&gt; 0)) <span style="color: blue;">Then</span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">            </span>Row.lat = Convert.ToDecimal(coordinate.latitude)</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">            </span>Row.long = Convert.ToDecimal(coordinate.longitude)</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">            </span>Row.acc = 1</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">        </span><span style="color: blue;">Else</span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">            </span>coordinate = GeoCode.GetCoordinates(Row.city &amp; <span style="color: maroon;">", "</span> &amp; Row.state &amp; <span style="color: maroon;">", "</span> &amp; Row.zip)</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">            </span><span style="color: blue;">If</span> ((coordinate.latitude &lt;&gt; 0) <span style="color: blue;">And</span> (coordinate.longitude &lt;&gt; 0)) <span style="color: blue;">Then</span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">                </span>Row.lat = Convert.ToDecimal(coordinate.latitude)</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">                </span>Row.long = Convert.ToDecimal(coordinate.longitude)</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">                </span>Row.acc = 2</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">            </span><span style="color: blue;">Else</span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">                </span>coordinate = GeoCode.GetCoordinates(Row.zip)</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">                </span><span style="color: blue;">If</span> ((coordinate.latitude &lt;&gt; 0) <span style="color: blue;">And</span> (coordinate.longitude &lt;&gt; 0)) <span style="color: blue;">Then</span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">                    </span>Row.lat = Convert.ToDecimal(coordinate.latitude)</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">                    </span>Row.long = Convert.ToDecimal(coordinate.longitude)</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">                    </span>Row.acc = 3</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">                </span><span style="color: blue;">Else</span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">                    </span>coordinate = GeoCode.GetCoordinates(Row.city &amp; <span style="color: maroon;">", "</span> &amp; Row.state)</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">                    </span><span style="color: blue;">If</span> ((coordinate.latitude &lt;&gt; 0) <span style="color: blue;">And</span> (coordinate.longitude &lt;&gt; 0)) <span style="color: blue;">Then</span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">                        </span>Row.lat = Convert.ToDecimal(coordinate.latitude)</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">                        </span>Row.long = Convert.ToDecimal(coordinate.longitude)</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">                        </span>Row.acc = 4</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">                    </span><span style="color: blue;">Else</span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">                        </span>coordinate = GeoCode.GetCoordinates(Row.state)</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">                        </span><span style="color: blue;">If</span> ((coordinate.latitude &lt;&gt; 0) <span style="color: blue;">And</span> (coordinate.longitude &lt;&gt; 0)) <span style="color: blue;">Then</span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">                            </span>Row.lat = Convert.ToDecimal(coordinate.latitude)</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">                            </span>Row.long = Convert.ToDecimal(coordinate.longitude)</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">                            </span>Row.acc = 5</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">                        </span><span style="color: blue;">End</span> <span style="color: blue;">If</span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">                    </span><span style="color: blue;">End</span> <span style="color: blue;">If</span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">                </span><span style="color: blue;">End</span> <span style="color: blue;">If</span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">            </span><span style="color: blue;">End</span> <span style="color: blue;">If</span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">        </span><span style="color: blue;">End</span> <span style="color: blue;">If</span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"><span style="mso-spacerun: yes;">    </span><span style="color: blue;">End</span> <span style="color: blue;">Sub</span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"> </span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt; mso-layout-grid-align: none;"><span style="font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;; mso-no-proof: yes;">End</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; mso-no-proof: yes;"> <span style="color: blue;">Class</span></span></p>
<p> </p>
<p></code></p>
]]></content:encoded>
			<wfw:commentRss>http://rickcaminiti.com/misc/google-geocoding-ssis/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

