<?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>nPath Ltd.</title>
	<atom:link href="http://www.npathweb.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.npathweb.com</link>
	<description>Web Development Blog</description>
	<lastBuildDate>Mon, 22 Feb 2010 15:16:30 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Garage Door Opener Stripped Gear-How do you remove a Roll Pin?</title>
		<link>http://www.npathweb.com/2010/02/18/garage-door-opener-stripped-gear-how-do-you-remove-a-roll-pin/</link>
		<comments>http://www.npathweb.com/2010/02/18/garage-door-opener-stripped-gear-how-do-you-remove-a-roll-pin/#comments</comments>
		<pubDate>Fri, 19 Feb 2010 02:30:19 +0000</pubDate>
		<dc:creator>B.Harding</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Home Repair]]></category>
		<category><![CDATA[Roll Pin]]></category>
		<category><![CDATA[Roll Punch]]></category>

		<guid isPermaLink="false">http://www.npathweb.com/?p=105</guid>
		<description><![CDATA[Q: How do you remove a Roll Pin?
A: With a Craftsman Roll Punch from Sears ]]></description>
			<content:encoded><![CDATA[<p>Q: How do you remove a Roll Pin?<br />
A: With a Craftsman Roll Punch from Sears</p>
<p>After about 10 years my garage door quit working. After a couple of turns of the screw driver I see that the innerds are full of gear dust. My drive gear is stripped!</p>
<p>To fix or replace? That is the question. I quickly discover that a new gear is only $12 on ebay and that includes grease and free shipping. Done.</p>
<p>When it arrives I come to a step in the instructions that simply says &#8220;remove roll pin from under the drive gear&#8221;.</p>
<p>Hmm. That seems to be a problem. As it turns out you need a Roll Punch to remove a Roll Pin.  A tool which I do not own. Home Depot, no. Lowes, no.  Sears, scoreboard! $20 bucks.</p>
<p>My garage door opener is now in full repair.  I could probably return the set but I&#8217;ll probably need it in another 10 years.</p>
<div id="attachment_108" class="wp-caption alignleft" style="width: 310px"><a href="http://www.npathweb.com/wp-content/upLoads/2010/02/24020_1311802519449_1362221554_31082304_3306524_n.jpg"><img class="size-medium wp-image-108" title="drive gear" src="http://www.npathweb.com/wp-content/upLoads/2010/02/24020_1311802519449_1362221554_31082304_3306524_n-300x224.jpg" alt="" width="300" height="224" /></a><p class="wp-caption-text">Drive Gear Stripped</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.npathweb.com/2010/02/18/garage-door-opener-stripped-gear-how-do-you-remove-a-roll-pin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Truncate a databound string at runtime</title>
		<link>http://www.npathweb.com/2009/12/30/truncate-a-databound-string-at-runtime/</link>
		<comments>http://www.npathweb.com/2009/12/30/truncate-a-databound-string-at-runtime/#comments</comments>
		<pubDate>Wed, 30 Dec 2009 20:59:10 +0000</pubDate>
		<dc:creator>B.Harding</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.npathweb.com/?p=102</guid>
		<description><![CDATA[So here is the scenario,
I want to display the first 25 characters of a text field in a grid.
You can do this a few ways such as, truncate when the datasource selects it, alter it on rowdatabound and probably a few others. But I wanted to try to find a way using the a format [...]]]></description>
			<content:encoded><![CDATA[<p>So here is the scenario,</p>
<p>I want to display the first 25 characters of a text field in a grid.</p>
<p>You can do this a few ways such as, truncate when the datasource selects it, alter it on rowdatabound and probably a few others. But I wanted to try to find a way using the a format string.</p>
<pre class="brush: csharp">

&lt;asp:Label ID=&quot;amanotesLabel&quot;
runat=&quot;server&quot;
Text=&#039;&lt;%#String.Format(&quot;{0}&quot;,Eval(&quot;notes&quot;)).Substring(0,25)%&gt;&#039;
</pre>
<p>it throws an error when the string is less than 25 characters which can be corrected like so&#8230;.<br />
There are 25 spaces after the {0}</p>
<pre class="brush: c#">

&lt;asp:Label ID=&quot;amanotesLabel&quot;

runat=&quot;server&quot;
Text=&#039;&lt;%#String.Format(&quot;{0}                         &quot;,Eval(&quot;notes&quot;)).Substring(0,25)%&gt;&#039;
</pre>
<p>So there you have it, no events needed.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.npathweb.com/2009/12/30/truncate-a-databound-string-at-runtime/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Copy a generic list, List, by ref, by value wierdness</title>
		<link>http://www.npathweb.com/2009/10/19/copy-a-generic-list-list-by-ref-by-value-wierdness/</link>
		<comments>http://www.npathweb.com/2009/10/19/copy-a-generic-list-list-by-ref-by-value-wierdness/#comments</comments>
		<pubDate>Mon, 19 Oct 2009 17:45:00 +0000</pubDate>
		<dc:creator>B.Harding</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Linq]]></category>

		<guid isPermaLink="false">http://www.npathweb.com/?p=100</guid>
		<description><![CDATA[Here is my latest weird problem.
I had a generic list, I wanted to  make a copy of it. So the aproach I used was to make the new list = the first one.
Enter the wierdness; any mods to the second list showed up in the first one. So I guess it used a pointer or [...]]]></description>
			<content:encoded><![CDATA[<p>Here is my latest weird problem.</p>
<p>I had a generic list, I wanted to  make a copy of it. So the aproach I used was to make the new list = the first one.</p>
<p>Enter the wierdness; any mods to the second list showed up in the first one. So I guess it used a pointer or passed it by reference instead of  making a copy like I expected.</p>
<p>Live and learn I guess. The work around was to initialize it blank and call the add range function passing it the first list.</p>
<p>Here is an example of what I&#8217;m talking about. You can past this into Linqpad as C# Statements and play around more.</p>
<p><!--</p>
<p>p.MsoNormal<br />
{margin-top:0in;<br />
margin-right:0in;<br />
margin-bottom:10.0pt;<br />
margin-left:0in;<br />
line-height:115%;<br />
font-size:11.0pt;<br />
font-family:"Calibri","sans-serif";<br />
}<br />
table.MsoNormalTable<br />
{line-height:115%;<br />
font-size:11.0pt;<br />
font-family:"Calibri","sans-serif";<br />
}<br />
--></p>
<div style="mso-element:para-border-div;border:none;border-bottom:solid windowtext 1.0pt; mso-border-bottom-alt:solid windowtext .75pt;padding:0in 0in 1.0pt 0in">
<p class="MsoNormal" style="border:none;mso-border-bottom-alt:solid windowtext .75pt; padding:0in;mso-padding-alt:0in 0in 1.0pt 0in"><span style="font-size:10.0pt; line-height:115%;font-family:Consolas;color:black">List&lt;</span><span style="font-size:10.0pt;line-height:115%;font-family:Consolas;color:blue">string</span><span style="font-size:10.0pt;line-height:115%;font-family:Consolas;color:black">&gt; s1 = </span><span style="font-size:10.0pt;line-height:115%;font-family:Consolas; color:blue">new</span><span style="font-size:10.0pt;line-height:115%; font-family:Consolas;color:black"> List&lt;</span><span style="font-size:10.0pt; line-height:115%;font-family:Consolas;color:blue">string</span><span style="font-size:10.0pt;line-height:115%;font-family:Consolas;color:black">&gt;{</span><span style="font-size:10.0pt;line-height:115%;font-family:Consolas;color:#DC1414">&#8220;one&#8221;</span><span style="font-size:10.0pt;line-height:115%;font-family:Consolas;color:black">,</span><span style="font-size:10.0pt;line-height:115%;font-family:Consolas;color:#DC1414">&#8220;two&#8221;</span><span style="font-size:10.0pt;line-height:115%;font-family:Consolas;color:black">,</span><span style="font-size:10.0pt;line-height:115%;font-family:Consolas;color:#DC1414">&#8220;three&#8221;</span><span style="font-size:10.0pt;line-height:115%;font-family:Consolas;color:black">,</span><span style="font-size:10.0pt;line-height:115%;font-family:Consolas;color:#DC1414">&#8220;four&#8221;</span><span style="font-size:10.0pt;line-height:115%;font-family:Consolas;color:black">,</span><span style="font-size:10.0pt;line-height:115%;font-family:Consolas;color:#DC1414">&#8220;five&#8221;</span><span style="font-size:10.0pt;line-height:115%;font-family:Consolas;color:black">};</span></p>
<p>List&lt;<span style="font-size:10.0pt;line-height:115%;font-family:Consolas; color:blue">string</span><span style="font-size:10.0pt;line-height:115%; font-family:Consolas;color:black">&gt; s2 = s1;</span></p>
<p>s2.Add(<span style="font-size:10.0pt;line-height:115%;font-family:Consolas; color:#DC1414">&#8220;six&#8221;</span><span style="font-size:10.0pt;line-height: 115%;font-family:Consolas;color:black">);</p>
<p>s2.Add(</span><span style="font-size:10.0pt;line-height:115%;font-family:Consolas; color:#DC1414">&#8220;seven&#8221;</span><span style="font-size:10.0pt; line-height:115%;font-family:Consolas;color:black">);</span></p>
<p>s1.Dump();</p>
<p>s2.Dump();<br />
List&lt;<span style="font-size:10.0pt;line-height:115%;font-family:Consolas; color:blue">string</span><span style="font-size:10.0pt;line-height:115%; font-family:Consolas;color:black">&gt; s3 = </span><span style="font-size:10.0pt; line-height:115%;font-family:Consolas;color:blue">new </span><span style="font-size:10.0pt;line-height:115%;font-family:Consolas;color:black">List&lt;</span><span style="font-size:10.0pt;line-height:115%;font-family:Consolas; color:blue">string</span><span style="font-size:10.0pt;line-height:115%; font-family:Consolas;color:black">&gt;{};</p>
<p>s3.AddRange(s1);</span></p>
<p>s3.Add(<span style="font-size:10.0pt;line-height:115%;font-family:Consolas; color:#DC1414">&#8220;eight&#8221;</span><span style="font-size:10.0pt; line-height:115%;font-family:Consolas;color:black">);</p>
<p>s3.Add(</span><span style="font-size:10.0pt;line-height:115%;font-family:Consolas; color:#DC1414">&#8220;nine&#8221;</span><span style="font-size:10.0pt;line-height: 115%;font-family:Consolas;color:black">);</p>
<p>s3.Add(</span><span style="font-size:10.0pt;line-height:115%;font-family:Consolas; color:#DC1414">&#8220;ten&#8221;</span><span style="font-size:10.0pt;line-height: 115%;font-family:Consolas;color:black">);</span></p>
<p>s1.Dump();</p>
<p>s3.Dump();</p></div>
<p class="MsoNormal"><span style="font-size:10.0pt;line-height:115%;font-family: Consolas;color:black">Returns:</span></p>
<table class="MsoNormalTable" style="margin-left:2.4pt;border-collapse:collapse;border:none;mso-border-alt:  solid #1177BB 1.0pt;mso-border-top-alt:solid #1177BB .5pt;mso-yfti-tbllook:  1184" border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr style="mso-yfti-irow:0;mso-yfti-firstrow:yes">
<td style="border: solid #AAAAAA 1.0pt; mso-border-alt: solid #AAAAAA .5pt; background: #1177BB; padding: 0in 2.4pt 1.2pt 1.2pt" valign="top">
<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:   normal"><strong><br />
<span style="font-size:8.5pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;   mso-fareast-font-family:&quot;Times New Roman&quot;;color:white"><br />
<span style="mso-field-code:&quot; HYPERLINK \0022\0022 &quot;"><span style="text-decoration: underline;"><br />
<span style="mso-bidi-font-size:   11.0pt;font-family:Webdings;color:blue">5</span><span style="mso-bidi-font-size:11.0pt;color:blue">List&lt;String&gt; (7 items)</span></span></span><br />
</span></strong></td>
</tr>
<tr style="mso-yfti-irow:1">
<td style="border:solid #AAAAAA 1.0pt;border-top:none;mso-border-top-alt:   solid #AAAAAA .5pt;mso-border-alt:solid #AAAAAA .5pt;padding:1.2pt 2.4pt 1.2pt 2.4pt" valign="top">
<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:   normal"><span style="font-size:9.5pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;   mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:&quot;Times New Roman&quot;"><br />
one</span></td>
</tr>
<tr style="mso-yfti-irow:2">
<td style="border:solid #AAAAAA 1.0pt;border-top:none;mso-border-top-alt:   solid #AAAAAA .5pt;mso-border-alt:solid #AAAAAA .5pt;padding:1.2pt 2.4pt 1.2pt 2.4pt" valign="top">
<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:   normal"><span style="font-size:9.5pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;   mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:&quot;Times New Roman&quot;"><br />
two</span></td>
</tr>
<tr style="mso-yfti-irow:3">
<td style="border:solid #AAAAAA 1.0pt;border-top:none;mso-border-top-alt:   solid #AAAAAA .5pt;mso-border-alt:solid #AAAAAA .5pt;padding:1.2pt 2.4pt 1.2pt 2.4pt" valign="top">
<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:   normal"><span style="font-size:9.5pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;   mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:&quot;Times New Roman&quot;"><br />
three</span></td>
</tr>
<tr style="mso-yfti-irow:4">
<td style="border:solid #AAAAAA 1.0pt;border-top:none;mso-border-top-alt:   solid #AAAAAA .5pt;mso-border-alt:solid #AAAAAA .5pt;padding:1.2pt 2.4pt 1.2pt 2.4pt" valign="top">
<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:   normal"><span style="font-size:9.5pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;   mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:&quot;Times New Roman&quot;"><br />
four</span></td>
</tr>
<tr style="mso-yfti-irow:5">
<td style="border:solid #AAAAAA 1.0pt;border-top:none;mso-border-top-alt:   solid #AAAAAA .5pt;mso-border-alt:solid #AAAAAA .5pt;padding:1.2pt 2.4pt 1.2pt 2.4pt" valign="top">
<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:   normal"><span style="font-size:9.5pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;   mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:&quot;Times New Roman&quot;"><br />
five</span></td>
</tr>
<tr style="mso-yfti-irow:6">
<td style="border:solid #AAAAAA 1.0pt;border-top:none;mso-border-top-alt:   solid #AAAAAA .5pt;mso-border-alt:solid #AAAAAA .5pt;padding:1.2pt 2.4pt 1.2pt 2.4pt" valign="top">
<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:   normal"><span style="font-size:9.5pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;   mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:&quot;Times New Roman&quot;"><br />
six</span></td>
</tr>
<tr style="mso-yfti-irow:7">
<td style="border:solid #AAAAAA 1.0pt;border-top:none;mso-border-top-alt:   solid #AAAAAA .5pt;mso-border-alt:solid #AAAAAA .5pt;padding:1.2pt 2.4pt 1.2pt 2.4pt" valign="top">
<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:   normal"><span style="font-size:9.5pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;   mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:&quot;Times New Roman&quot;"><br />
seven</span></td>
</tr>
<tr style="mso-yfti-irow:8">
<td style="border: solid #AAAAAA 1.0pt; border-top: none; mso-border-top-alt: solid #AAAAAA .5pt; mso-border-alt: solid #AAAAAA .5pt; background: #1177BB; padding: 0in 2.4pt 1.2pt 1.2pt" valign="top">
<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:   normal"><strong><br />
<span style="font-size:8.5pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;   mso-fareast-font-family:&quot;Times New Roman&quot;;color:white"><br />
<span style="mso-field-code:&quot; HYPERLINK \0022\0022 &quot;"><span style="text-decoration: underline;"><br />
<span style="mso-bidi-font-size:   11.0pt;font-family:Webdings;color:blue">5</span><span style="mso-bidi-font-size:11.0pt;color:blue">List&lt;String&gt; (7 items)</span></span></span><br />
</span></strong></td>
</tr>
<tr style="mso-yfti-irow:9">
<td style="border:solid #AAAAAA 1.0pt;border-top:none;mso-border-top-alt:   solid #AAAAAA .5pt;mso-border-alt:solid #AAAAAA .5pt;padding:1.2pt 2.4pt 1.2pt 2.4pt" valign="top">
<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:   normal"><span style="font-size:9.5pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;   mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:&quot;Times New Roman&quot;"><br />
one</span></td>
</tr>
<tr style="mso-yfti-irow:10">
<td style="border:solid #AAAAAA 1.0pt;border-top:none;mso-border-top-alt:   solid #AAAAAA .5pt;mso-border-alt:solid #AAAAAA .5pt;padding:1.2pt 2.4pt 1.2pt 2.4pt" valign="top">
<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:   normal"><span style="font-size:9.5pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;   mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:&quot;Times New Roman&quot;"><br />
two</span></td>
</tr>
<tr style="mso-yfti-irow:11">
<td style="border:solid #AAAAAA 1.0pt;border-top:none;mso-border-top-alt:   solid #AAAAAA .5pt;mso-border-alt:solid #AAAAAA .5pt;padding:1.2pt 2.4pt 1.2pt 2.4pt" valign="top">
<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:   normal"><span style="font-size:9.5pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;   mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:&quot;Times New Roman&quot;"><br />
three</span></td>
</tr>
<tr style="mso-yfti-irow:12">
<td style="border:solid #AAAAAA 1.0pt;border-top:none;mso-border-top-alt:   solid #AAAAAA .5pt;mso-border-alt:solid #AAAAAA .5pt;padding:1.2pt 2.4pt 1.2pt 2.4pt" valign="top">
<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:   normal"><span style="font-size:9.5pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;   mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:&quot;Times New Roman&quot;"><br />
four</span></td>
</tr>
<tr style="mso-yfti-irow:13">
<td style="border:solid #AAAAAA 1.0pt;border-top:none;mso-border-top-alt:   solid #AAAAAA .5pt;mso-border-alt:solid #AAAAAA .5pt;padding:1.2pt 2.4pt 1.2pt 2.4pt" valign="top">
<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:   normal"><span style="font-size:9.5pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;   mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:&quot;Times New Roman&quot;"><br />
five</span></td>
</tr>
<tr style="mso-yfti-irow:14">
<td style="border:solid #AAAAAA 1.0pt;border-top:none;mso-border-top-alt:   solid #AAAAAA .5pt;mso-border-alt:solid #AAAAAA .5pt;padding:1.2pt 2.4pt 1.2pt 2.4pt" valign="top">
<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:   normal"><span style="font-size:9.5pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;   mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:&quot;Times New Roman&quot;"><br />
six</span></td>
</tr>
<tr style="mso-yfti-irow:15;mso-yfti-lastrow:yes">
<td style="border:solid #AAAAAA 1.0pt;border-top:none;mso-border-top-alt:   solid #AAAAAA .5pt;mso-border-alt:solid #AAAAAA .5pt;padding:1.2pt 2.4pt 1.2pt 2.4pt" valign="top">
<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:   normal"><span style="font-size:9.5pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;   mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:&quot;Times New Roman&quot;"><br />
seven</span></td>
</tr>
</tbody>
</table>
<p class="MsoNormal" style="margin-bottom:.1in;line-height:normal"><span style="font-size:9.5pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;mso-fareast-font-family: &quot;Times New Roman&quot;;mso-bidi-font-family:&quot;Times New Roman&quot;;display:none; mso-hide:all"> </span></p>
<table class="MsoNormalTable" style="margin-left:2.4pt;border-collapse:collapse;border:none;mso-border-alt:  solid #1177BB 1.0pt;mso-border-top-alt:solid #1177BB .5pt;mso-yfti-tbllook:  1184" border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr style="mso-yfti-irow:0;mso-yfti-firstrow:yes">
<td style="border: solid #AAAAAA 1.0pt; mso-border-alt: solid #AAAAAA .5pt; background: #1177BB; padding: 0in 2.4pt 1.2pt 1.2pt" valign="top">
<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:   normal"><strong><br />
<span style="font-size:8.5pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;   mso-fareast-font-family:&quot;Times New Roman&quot;;color:white"><br />
<span style="mso-field-code:&quot; HYPERLINK \0022\0022 &quot;"><span style="text-decoration: underline;"><br />
<span style="mso-bidi-font-size:   11.0pt;font-family:Webdings;color:blue">5</span><span style="mso-bidi-font-size:11.0pt;color:blue">List&lt;String&gt; (7 items)</span></span></span><br />
</span></strong></td>
</tr>
<tr style="mso-yfti-irow:1">
<td style="border:solid #AAAAAA 1.0pt;border-top:none;mso-border-top-alt:   solid #AAAAAA .5pt;mso-border-alt:solid #AAAAAA .5pt;padding:1.2pt 2.4pt 1.2pt 2.4pt" valign="top">
<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:   normal"><span style="font-size:9.5pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;   mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:&quot;Times New Roman&quot;"><br />
one</span></td>
</tr>
<tr style="mso-yfti-irow:2">
<td style="border:solid #AAAAAA 1.0pt;border-top:none;mso-border-top-alt:   solid #AAAAAA .5pt;mso-border-alt:solid #AAAAAA .5pt;padding:1.2pt 2.4pt 1.2pt 2.4pt" valign="top">
<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:   normal"><span style="font-size:9.5pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;   mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:&quot;Times New Roman&quot;"><br />
two</span></td>
</tr>
<tr style="mso-yfti-irow:3">
<td style="border:solid #AAAAAA 1.0pt;border-top:none;mso-border-top-alt:   solid #AAAAAA .5pt;mso-border-alt:solid #AAAAAA .5pt;padding:1.2pt 2.4pt 1.2pt 2.4pt" valign="top">
<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:   normal"><span style="font-size:9.5pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;   mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:&quot;Times New Roman&quot;"><br />
three</span></td>
</tr>
<tr style="mso-yfti-irow:4">
<td style="border:solid #AAAAAA 1.0pt;border-top:none;mso-border-top-alt:   solid #AAAAAA .5pt;mso-border-alt:solid #AAAAAA .5pt;padding:1.2pt 2.4pt 1.2pt 2.4pt" valign="top">
<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:   normal"><span style="font-size:9.5pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;   mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:&quot;Times New Roman&quot;"><br />
four</span></td>
</tr>
<tr style="mso-yfti-irow:5">
<td style="border:solid #AAAAAA 1.0pt;border-top:none;mso-border-top-alt:   solid #AAAAAA .5pt;mso-border-alt:solid #AAAAAA .5pt;padding:1.2pt 2.4pt 1.2pt 2.4pt" valign="top">
<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:   normal"><span style="font-size:9.5pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;   mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:&quot;Times New Roman&quot;"><br />
five</span></td>
</tr>
<tr style="mso-yfti-irow:6">
<td style="border:solid #AAAAAA 1.0pt;border-top:none;mso-border-top-alt:   solid #AAAAAA .5pt;mso-border-alt:solid #AAAAAA .5pt;padding:1.2pt 2.4pt 1.2pt 2.4pt" valign="top">
<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:   normal"><span style="font-size:9.5pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;   mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:&quot;Times New Roman&quot;"><br />
six</span></td>
</tr>
<tr style="mso-yfti-irow:7">
<td style="border:solid #AAAAAA 1.0pt;border-top:none;mso-border-top-alt:   solid #AAAAAA .5pt;mso-border-alt:solid #AAAAAA .5pt;padding:1.2pt 2.4pt 1.2pt 2.4pt" valign="top">
<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:   normal"><span style="font-size:9.5pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;   mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:&quot;Times New Roman&quot;"><br />
seven</span></td>
</tr>
<tr style="mso-yfti-irow:8">
<td style="border: solid #AAAAAA 1.0pt; border-top: none; mso-border-top-alt: solid #AAAAAA .5pt; mso-border-alt: solid #AAAAAA .5pt; background: #1177BB; padding: 0in 2.4pt 1.2pt 1.2pt" valign="top">
<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:   normal"><strong><br />
<span style="font-size:8.5pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;   mso-fareast-font-family:&quot;Times New Roman&quot;;color:white"><br />
<span style="mso-field-code:&quot; HYPERLINK \0022\0022 &quot;"><span style="text-decoration: underline;"><br />
<span style="mso-bidi-font-size:   11.0pt;font-family:Webdings;color:blue">5</span><span style="mso-bidi-font-size:11.0pt;color:blue">List&lt;String&gt; (10 items)</span></span></span><br />
</span></strong></td>
</tr>
<tr style="mso-yfti-irow:9">
<td style="border:solid #AAAAAA 1.0pt;border-top:none;mso-border-top-alt:   solid #AAAAAA .5pt;mso-border-alt:solid #AAAAAA .5pt;padding:1.2pt 2.4pt 1.2pt 2.4pt" valign="top">
<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:   normal"><span style="font-size:9.5pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;   mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:&quot;Times New Roman&quot;"><br />
one</span></td>
</tr>
<tr style="mso-yfti-irow:10">
<td style="border:solid #AAAAAA 1.0pt;border-top:none;mso-border-top-alt:   solid #AAAAAA .5pt;mso-border-alt:solid #AAAAAA .5pt;padding:1.2pt 2.4pt 1.2pt 2.4pt" valign="top">
<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:   normal"><span style="font-size:9.5pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;   mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:&quot;Times New Roman&quot;"><br />
two</span></td>
</tr>
<tr style="mso-yfti-irow:11">
<td style="border:solid #AAAAAA 1.0pt;border-top:none;mso-border-top-alt:   solid #AAAAAA .5pt;mso-border-alt:solid #AAAAAA .5pt;padding:1.2pt 2.4pt 1.2pt 2.4pt" valign="top">
<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:   normal"><span style="font-size:9.5pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;   mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:&quot;Times New Roman&quot;"><br />
three</span></td>
</tr>
<tr style="mso-yfti-irow:12">
<td style="border:solid #AAAAAA 1.0pt;border-top:none;mso-border-top-alt:   solid #AAAAAA .5pt;mso-border-alt:solid #AAAAAA .5pt;padding:1.2pt 2.4pt 1.2pt 2.4pt" valign="top">
<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:   normal"><span style="font-size:9.5pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;   mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:&quot;Times New Roman&quot;"><br />
four</span></td>
</tr>
<tr style="mso-yfti-irow:13">
<td style="border:solid #AAAAAA 1.0pt;border-top:none;mso-border-top-alt:   solid #AAAAAA .5pt;mso-border-alt:solid #AAAAAA .5pt;padding:1.2pt 2.4pt 1.2pt 2.4pt" valign="top">
<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:   normal"><span style="font-size:9.5pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;   mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:&quot;Times New Roman&quot;"><br />
five</span></td>
</tr>
<tr style="mso-yfti-irow:14">
<td style="border:solid #AAAAAA 1.0pt;border-top:none;mso-border-top-alt:   solid #AAAAAA .5pt;mso-border-alt:solid #AAAAAA .5pt;padding:1.2pt 2.4pt 1.2pt 2.4pt" valign="top">
<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:   normal"><span style="font-size:9.5pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;   mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:&quot;Times New Roman&quot;"><br />
six</span></td>
</tr>
<tr style="mso-yfti-irow:15">
<td style="border:solid #AAAAAA 1.0pt;border-top:none;mso-border-top-alt:   solid #AAAAAA .5pt;mso-border-alt:solid #AAAAAA .5pt;padding:1.2pt 2.4pt 1.2pt 2.4pt" valign="top">
<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:   normal"><span style="font-size:9.5pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;   mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:&quot;Times New Roman&quot;"><br />
seven</span></td>
</tr>
<tr style="mso-yfti-irow:16">
<td style="border:solid #AAAAAA 1.0pt;border-top:none;mso-border-top-alt:   solid #AAAAAA .5pt;mso-border-alt:solid #AAAAAA .5pt;padding:1.2pt 2.4pt 1.2pt 2.4pt" valign="top">
<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:   normal"><span style="font-size:9.5pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;   mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:&quot;Times New Roman&quot;"><br />
eight</span></td>
</tr>
<tr style="mso-yfti-irow:17">
<td style="border:solid #AAAAAA 1.0pt;border-top:none;mso-border-top-alt:   solid #AAAAAA .5pt;mso-border-alt:solid #AAAAAA .5pt;padding:1.2pt 2.4pt 1.2pt 2.4pt" valign="top">
<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:   normal"><span style="font-size:9.5pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;   mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:&quot;Times New Roman&quot;"><br />
nine</span></td>
</tr>
<tr style="mso-yfti-irow:18;mso-yfti-lastrow:yes">
<td style="border:solid #AAAAAA 1.0pt;border-top:none;mso-border-top-alt:   solid #AAAAAA .5pt;mso-border-alt:solid #AAAAAA .5pt;padding:1.2pt 2.4pt 1.2pt 2.4pt" valign="top">
<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:   normal"><span style="font-size:9.5pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;   mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:&quot;Times New Roman&quot;"><br />
ten</span></td>
</tr>
</tbody>
</table>
<p class="MsoNormal">
]]></content:encoded>
			<wfw:commentRss>http://www.npathweb.com/2009/10/19/copy-a-generic-list-list-by-ref-by-value-wierdness/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Search your entire server for a string across all databases! MSSql 2000</title>
		<link>http://www.npathweb.com/2009/10/09/search-your-entire-server-for-a-string-across-all-databases-mssql-2000/</link>
		<comments>http://www.npathweb.com/2009/10/09/search-your-entire-server-for-a-string-across-all-databases-mssql-2000/#comments</comments>
		<pubDate>Fri, 09 Oct 2009 21:39:42 +0000</pubDate>
		<dc:creator>B.Harding</dc:creator>
				<category><![CDATA[SQL server]]></category>

		<guid isPermaLink="false">http://www.npathweb.com/?p=94</guid>
		<description><![CDATA[You can use this query to search your entire server for a string. It will search views, stored procs, triggers, everything.
All the sql text in your database is stored in system tables under each database. There are a few hardships to overcome in order to search.
1.) Text is split into 4000 character chunks. So every [...]]]></description>
			<content:encoded><![CDATA[<p>You can use this query to search your entire server for a string. It will search views, stored procs, triggers, everything.</p>
<p>All the sql text in your database is stored in system tables under each database. There are a few hardships to overcome in order to search.</p>
<p>1.) Text is split into 4000 character chunks. So every 4k chunk has a colID to note its position in the stack of rows .  The names are stored in sysobjects and the text is stored in syscomments. The issue is when your search hits in the second chunk. You need to pull in all chunks when any one finds a hit.</p>
<p>2.) Each database has it&#8217;s own system tables. For one search to check every database&#8217;s syscomments you need to loop. My example solution didn&#8217;t use a cursor.</p>
<p>I pulled a list of database names out of master.dbo.sysdatabases and put it in a temp table. That is what I used for my loop. I  just jet the top row, work it, delete it, and get the next one from the top.</p>
<p>In the loop I execute sql constructed dynamically based on the database name of in the current loop iteration. It searches for all object Ids that have text matching the search term. Then gets all chucks for that object.  To help me narrow down the search I also search on object type. V for view, p for proc  etc&#8230;Leave type &#8221; to get all types.</p>
<p>If you paste this in your query window and set the search strings you should get results.  I clipped the text to 3990 because I kept getting errors that the row was too large. I should probably look into it but this will do for now.</p>
<p>I&#8217;m dealing with MSSql Server 2000 here and this works.  I plan to make this a stored proc and call it from asp but right now it&#8217;s 5:00pm on Friday and this can wait &#8217;till Monday.</p>
<p><!--</p>
<p>p.MsoNormal<br />
{margin-top:0in;<br />
margin-right:0in;<br />
margin-bottom:10.0pt;<br />
margin-left:0in;<br />
line-height:115%;<br />
font-size:11.0pt;<br />
font-family:"Calibri","sans-serif";<br />
}<br />
--></p>
<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-layout-grid-align:none;text-autospace:none"><span style="font-size: 10.0pt;font-family:&quot;Courier New&quot;;color:blue;mso-no-proof:yes">Create</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-no-proof:yes"> <span style="color:blue">Table</span> #dblist<span style="color:blue"> </span><span style="color:gray">(</span>NAME <span style="color:blue">VARCHAR</span><span style="color:gray">(</span>80<span style="color:gray">))</span></span></p>
<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-layout-grid-align:none;text-autospace:none"><span style="font-size: 10.0pt;font-family:&quot;Courier New&quot;;color:blue;mso-no-proof:yes">create</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-no-proof:yes"><span style="color:blue">table</span> #results<span style="color:blue"> </span><span style="color:gray">(</span>name <span style="color:blue">nvarchar</span><span style="color:gray">(</span>80<span style="color:gray">),</span><span style="color:blue">text</span> <span style="color:blue">varchar</span><span style="color:gray">(</span>4000<span style="color:gray">))</span></span></p>
<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-layout-grid-align:none;text-autospace:none"><span style="font-size: 10.0pt;font-family:&quot;Courier New&quot;;color:gray;mso-no-proof:yes"> </span></p>
<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-layout-grid-align:none;text-autospace:none"><span style="font-size: 10.0pt;font-family:&quot;Courier New&quot;;color:blue;mso-no-proof:yes">insert</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-no-proof:yes"> <span style="color:blue">into</span> #dblist</span></p>
<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-layout-grid-align:none;text-autospace:none"><span style="font-size: 10.0pt;font-family:&quot;Courier New&quot;;color:blue;mso-no-proof:yes">exec</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:gray;mso-no-proof:yes">(</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:red;mso-no-proof:yes">&#8217;select         name from master..sysdatabases order by name&#8217;</span><span style="font-size: 10.0pt;font-family:&quot;Courier New&quot;;color:gray;mso-no-proof:yes">)</span></p>
<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-layout-grid-align:none;text-autospace:none"><span style="font-size: 10.0pt;font-family:&quot;Courier New&quot;;color:gray;mso-no-proof:yes"><br />
</span></p>
<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-layout-grid-align:none;text-autospace:none"><span style="font-size: 10.0pt;font-family:&quot;Courier New&quot;;color:blue;mso-no-proof:yes">declare</span><span style="font-size: 10.0pt;font-family:&quot;Courier New&quot;;color:blue;mso-no-proof:yes"> @ObjectType <span style="color:blue">as</span> <span style="color:blue">nvarchar</span><span style="color:gray">(</span>80<span style="color:gray">)<br />
</span>declare</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-no-proof:yes"> @search <span style="color:blue">as</span> <span style="color:blue">nvarchar</span><span style="color:gray">(</span>80<span style="color:gray">)</span></span></p>
<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-layout-grid-align:none;text-autospace:none"><span style="font-size: 10.0pt;font-family:&quot;Courier New&quot;;color:gray;mso-no-proof:yes"> </span></p>
<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-layout-grid-align:none;text-autospace:none"><span style="font-size: 10.0pt;font-family:&quot;Courier New&quot;;color:blue;mso-no-proof:yes">set</span><span style="font-size: 10.0pt;font-family:&quot;Courier New&quot;;color:blue;mso-no-proof:yes"> @search <span style="color:gray">=</span> <span style="color:red">&#8216;update&#8217; &#8211;change this</span><br />
set</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-no-proof:yes"> @ObjectType<span style="color:gray">=</span><span style="color:red">&#8216;p&#8217;  &#8211;searches only procedures</span><br />
<span style="color:green">&#8211;set to &#8221; for all types</span></span></p>
<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-layout-grid-align:none;text-autospace:none"><span style="font-size: 10.0pt;font-family:&quot;Courier New&quot;;color:blue;mso-no-proof:yes">declare</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-no-proof:yes"> @dbname <span style="color:blue">as</span> <span style="color:blue">nvarchar</span><span style="color:gray">(</span>80<span style="color:gray">)</span></span></p>
<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-layout-grid-align:none;text-autospace:none"><span style="font-size: 10.0pt;font-family:&quot;Courier New&quot;;color:blue;mso-no-proof:yes">set</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-no-proof:yes"> @dbname<span style="color:gray">=</span><span style="color:blue"> </span><span style="color:gray">(</span><span style="color:blue">select</span> <span style="color:blue">top</span> 1 name <span style="color:blue">from</span> #dblist<span style="color:gray">)</span></span></p>
<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-layout-grid-align:none;text-autospace:none"><span style="font-size: 10.0pt;font-family:&quot;Courier New&quot;;color:blue;mso-no-proof:yes">while</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-no-proof:yes"> @dbname<span style="color:gray">&lt;&gt;</span><span style="color:red">&#8221;</span></span></p>
<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-layout-grid-align:none;text-autospace:none"><span style="font-size: 10.0pt;font-family:&quot;Courier New&quot;;mso-no-proof:yes"><span style="mso-tab-count: 1"> </span><span style="color:blue">begin</span></span></p>
<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-layout-grid-align:none;text-autospace:none"><span style="font-size: 10.0pt;font-family:&quot;Courier New&quot;;mso-no-proof:yes"><span style="color:blue">insert</span> <span style="color:blue">into</span> #results<span style="mso-tab-count: 3"><br />
</span><span style="color:blue">exec</span><span style="mso-tab-count: 4">(<br />
</span><span style="color:red">&#8217;select id &#8216;</span> <span style="color:gray">+</span><span style="color:red"><br />
&#8216;into #found &#8216;</span> <span style="mso-tab-count: 4">+<br />
</span><span style="color:red">&#8216;from ['</span><span style="color:gray">+</span>@dbname<span style="color:gray">+</span><span style="color:red">']..syscomments &#8216;</span><span style="mso-tab-count: 4">+<br />
</span><span style="color:red">&#8216;where [text] like &#8221;%&#8217;</span><span style="color:gray">+</span> @search <span style="color:gray">+</span><span style="color:red">&#8216;%&#8221; &#8216;</span> <span style="color:gray">+</span></span></p>
<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-layout-grid-align:none;text-autospace:none"><span style="font-size: 10.0pt;font-family:&quot;Courier New&quot;;mso-no-proof:yes"><span style="mso-tab-count: 4"> </span><span style="color:red">&#8217;select &#8221;&#8217;</span><span style="color:gray">+</span> @dbname<span style="color:gray">+</span><span style="color:red">&#8216;:&#8221; + so.name         as name, left(sc.text, 3990) &#8216; +<br />
&#8216;from ['</span> <span style="color:gray">+</span></span><span style="font-size: 10.0pt;font-family:&quot;Courier New&quot;;mso-no-proof:yes"> @dbname <span style="color:gray">+</span><span style="color:red"> ']..syscomments sc &#8216;</span> <span style="color:gray">+</span><span style="mso-tab-count: 4"><br />
</span><span style="color:red">&#8216;inner join ['</span> <span style="color:gray">+</span> @dbname <span style="color:gray">+</span> <span style="color:red">']..sysobjects         so on sc.id= so.id &#8216;</span> <span style="color:gray">+</span><span style="mso-tab-count: 4"><br />
</span><span style="color:red">&#8216;where sc.id in (select id from #found) &#8216;</span><span style="mso-tab-count: 4">+</span><span style="color:red"><br />
&#8216;and<span style="mso-spacerun:yes"> </span> xtype like &#8221;%&#8217;</span> <span style="color:gray">+</span> @ObjectType<span style="color:gray">+</span> <span style="color:red">&#8216;%&#8221; &#8216;</span><span style="color:gray">+</span><span style="color:red"><br />
&#8216;order by name, colid &#8216;</span><span style="mso-tab-count: 4">+<br />
</span><span style="color:red">&#8216;drop table #found&#8217;</span><br />
</span></p>
<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-layout-grid-align:none;text-autospace:none"><span style="font-size: 10.0pt;font-family:&quot;Courier New&quot;;mso-no-proof:yes"><span style="color:gray">)</span></span></p>
<p><span style="font-size: 10.0pt;font-family:&quot;Courier New&quot;;mso-no-proof:yes"><span style="color:blue">delete</span><span style="mso-spacerun:yes"> </span><span style="color:blue">from</span> #dblist <span style="color:blue"> where</span> name<span style="color:gray">=</span> @dbname</span></p>
<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-layout-grid-align:none;text-autospace:none"><span style="font-size: 10.0pt;font-family:&quot;Courier New&quot;;mso-no-proof:yes"><span style="mso-tab-count: 2"></span><span style="color:blue">set</span> @dbname<span style="color:gray">=</span><span style="color:blue"> </span><span style="color:gray">(</span><span style="color:blue">select</span> <span style="color:blue">top</span> 1 name <span style="color:blue">from</span> #dblist<span style="color:gray">)</span></span></p>
<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-layout-grid-align:none;text-autospace:none"><span style="font-size: 10.0pt;font-family:&quot;Courier New&quot;;mso-no-proof:yes"><span style="mso-tab-count: 1"> </span><span style="color:blue">end</span></span></p>
<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-layout-grid-align:none;text-autospace:none"><span style="font-size: 10.0pt;font-family:&quot;Courier New&quot;;color:blue;mso-no-proof:yes"> </span></p>
<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-layout-grid-align:none;text-autospace:none"><span style="font-size: 10.0pt;font-family:&quot;Courier New&quot;;color:blue;mso-no-proof:yes">select</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-no-proof:yes"> <span style="color:gray">*</span> <span style="color:blue">from</span> #results</span></p>
<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-layout-grid-align:none;text-autospace:none"><span style="font-size: 10.0pt;font-family:&quot;Courier New&quot;;mso-no-proof:yes"> </span></p>
<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-layout-grid-align:none;text-autospace:none"><span style="font-size: 10.0pt;font-family:&quot;Courier New&quot;;color:blue;mso-no-proof:yes">drop </span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-no-proof:yes"><span style="color:blue">table</span> #dblist</span></p>
<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-layout-grid-align:none;text-autospace:none"><span style="font-size: 10.0pt;font-family:&quot;Courier New&quot;;color:blue;mso-no-proof:yes">drop</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-no-proof:yes"> <span style="color:blue">table</span> #results</span></p>
<p class="MsoNormal">
]]></content:encoded>
			<wfw:commentRss>http://www.npathweb.com/2009/10/09/search-your-entire-server-for-a-string-across-all-databases-mssql-2000/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Store an IP Address in a human-readable Int64 (bigint)</title>
		<link>http://www.npathweb.com/2009/09/29/83/</link>
		<comments>http://www.npathweb.com/2009/09/29/83/#comments</comments>
		<pubDate>Tue, 29 Sep 2009 13:34:07 +0000</pubDate>
		<dc:creator>B.Harding</dc:creator>
				<category><![CDATA[SQL server]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.npathweb.com/?p=83</guid>
		<description><![CDATA[Lets say you have an  ip address in a string such as  &#8221;127.1.2.3&#8243;
This code will store the information in an int64 (C#) or bigint (SQL) in with three places per octet.
127001002003
The highest this number could go is 255,255,255,255.00 which is too large for a 32 bit integer. Hence the Int64. In SQL an 64 bit [...]]]></description>
			<content:encoded><![CDATA[<p>Lets say you have an  ip address in a string such as  &#8221;127.1.2.3&#8243;</p>
<p>This code will store the information in an int64 (C#) or bigint (SQL) in with three places per octet.</p>
<p>127001002003</p>
<p>The highest this number could go is 255,255,255,255.00 which is too large for a 32 bit integer. Hence the Int64. In SQL an 64 bit Integer is big int so that is what you&#8217;ll need to store in an MS-SQL Database.</p>
<p>I worked this up as a work-around on a project and present it here for your enjoyment.</p>
<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-layout-grid-align:none;text-autospace:none"><span style="font-family: 'Courier New', 'Times New Roman', 'Bitstream Charter', Times, serif;"><span style="color: #0000ff;">using System.Text.RegularExpressions;<br />
</span></span></p>
<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-layout-grid-align:none;text-autospace:none"><span style="font-size: 10.0pt;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">static</span><span style="color:#2B91AF"> Int64</span> convertIP(<span style="color:blue">string</span> sAddress) {<br />
<span style="color:#2B91AF"> </span><br />
<span style="color:#2B91AF"> Match</span> ipaddress =<span style="color:#2B91AF"> Regex</span>.Match(sAddress,<span style="color:#A31515">&#8220;^([\\d]*).([\\d]*).([\\d]*).([\\d]*)&#8221;</span>);</span></p>
<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-layout-grid-align:none;text-autospace:none"><span style="font-size: 10.0pt;font-family:&quot;Courier New&quot;;mso-no-proof:yes"> </span></p>
<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-layout-grid-align:none;text-autospace:none"><span style="font-size: 10.0pt;font-family:&quot;Courier New&quot;;mso-no-proof:yes"><span style="color:#2B91AF"> <span style="color: #2b91af;">Int64</span> iAddress = 0;</span></span></p>
<p>Int64 ip1 =<span style="color:#2B91AF">Convert</span>.ToInt64(ipaddress.Groups[1].ToString())<span style="mso-spacerun:yes"> </span>* 1000000000;<br />
<span style="color:#2B91AF"> Int64</span> ip2 =<span style="color:#2B91AF">Convert</span>.ToInt64(ipaddress.Groups[2].ToString()) * 1000000;<br />
<span style="color:#2B91AF"> Int64</span> ip3 =<span style="color:#2B91AF">Convert</span>.ToInt64(ipaddress.Groups[3].ToString()) * 1000;<br />
<span style="color:#2B91AF"> Int64</span> ip4 =<span style="color:#2B91AF">Convert</span>.ToInt64(ipaddress.Groups[4].ToString());</p>
<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-layout-grid-align:none;text-autospace:none"><span style="font-family: 'Courier New', 'Times New Roman', 'Bitstream Charter', Times, serif; "> iAddress = ip1 + ip2 + ip3 + ip4;</span></p>
<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-layout-grid-align:none;text-autospace:none"><span style="font-size: 10.0pt;font-family:&quot;Courier New&quot;;mso-no-proof:yes"> </span></p>
<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-layout-grid-align:none;text-autospace:none"><span style="font-size: 10.0pt;font-family:&quot;Courier New&quot;;mso-no-proof:yes"><span style="mso-spacerun:yes"><br />
</span><span style="color:blue">return</span> iAddress;</span></p>
<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-layout-grid-align:none;text-autospace:none"><span style="font-size: 10.0pt;font-family:&quot;Courier New&quot;;mso-no-proof:yes"> </span></p>
<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-layout-grid-align:none;text-autospace:none"><span style="font-size: 10.0pt;font-family:&quot;Courier New&quot;;mso-no-proof:yes"><br />
<span style="mso-spacerun:yes"> </span><br />
}</span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;line-height:115%;font-family: &quot;Courier New&quot;;mso-no-proof:yes"><span style="mso-spacerun:yes">Extra credit: This number is now 127,001,002,003. You can use string formating to display it as 127.001.002.003 by using the format string N0 (Number, zero decimal places) and changing the number group separator from the default comma to a period. All with the raw int64, no function required.</span></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;line-height:115%;font-family: &quot;Courier New&quot;;mso-no-proof:yes"><span style="mso-spacerun:yes"> </span></span></p>
<p><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;; mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;color:#2B91AF; mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA; mso-no-proof:yes">Int64</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;; mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;mso-ansi-language: EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA;mso-no-proof:yes"> iAddress = convertIP(Request.UserHostAddress);</span></p>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px;">Response.Write(util.convertIP(Request.UserHostAddress).ToString(&#8220;N0&#8243;, new NumberFormatInfo { NumberGroupSeparator = &#8220;.&#8221; }));</div>
<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-layout-grid-align:none;text-autospace:none"><span style="font-family: 'Courier New', 'Times New Roman', 'Bitstream Charter', Times, serif;">Response.Write(iAddress).ToString(<span style="color:#A31515">&#8220;N0&#8243;</span>, <span style="color:blue">new </span><span style="color:#2B91AF">NumberFormatInfo</span> { NumberGroupSeparator =<span style="color:#A31515">&#8220;.&#8221;</span> }));</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.npathweb.com/2009/09/29/83/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Watch out Chuck Norris! Scott Guthrie is in town!</title>
		<link>http://www.npathweb.com/2009/09/24/watch-out-chuck-norris-scott-guthrie-is-in-town/</link>
		<comments>http://www.npathweb.com/2009/09/24/watch-out-chuck-norris-scott-guthrie-is-in-town/#comments</comments>
		<pubDate>Thu, 24 Sep 2009 16:09:29 +0000</pubDate>
		<dc:creator>B.Harding</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.npathweb.com/?p=79</guid>
		<description><![CDATA[Boosted from http://developerdeveloperdeveloper.com/guathon/Default.aspx
Some things you might not know about Scott Guthrie

When Scott Guthrie throws exceptions, it’s across the room.
All arrays Scott Guthrie declares are of infinite size, because Scott Guthrie knows no bounds.
Scott Guthrie doesn’t have disk latency because the hard drive knows to hurry up.
Scott Guthrie writes code that optimizes itself.
Scott Guthrie can’t test [...]]]></description>
			<content:encoded><![CDATA[<p><strong><em>Boosted from <a href="http://developerdeveloperdeveloper.com/guathon/Default.aspx">http://developerdeveloperdeveloper.com/guathon/Default.aspx</a></em></strong></p>
<p><strong><em>Some things you might not know about Scott Guthrie</em></strong></p>
<ol>
<li>When Scott Guthrie throws exceptions, it’s across the room.</li>
<li>All arrays Scott Guthrie declares are of infinite size, because Scott Guthrie knows no bounds.</li>
<li>Scott Guthrie doesn’t have disk latency because the hard drive knows to hurry up.</li>
<li>Scott Guthrie writes code that optimizes itself.</li>
<li>Scott Guthrie can’t test for equality because he has no equal.</li>
<li>Scott Guthrie doesn’t need garbage collection because he doesn’t call .Dispose(), he calls .DropKick().</li>
<li>Scott Guthrie’s first program was kill -9.</li>
<li>Scott Guthrie burst the dot com bubble.</li>
<li>All browsers support the hex definitions #scott and #guthrie for the colors black and blue.</li>
<li>MySpace actually isn’t your space, it’s Scott’s (he just lets you use it).</li>
<li>Scott Guthrie can write infinite recursion functions &#8230; and have them return.</li>
<li>Scott Guthrie can solve the Towers of Hanoi in one move.</li>
<li>The only pattern Scott Guthrie knows is God Object.</li>
<li>Scott Guthrie finished World of Warcraft.</li>
<li>Project managers never ask Scott Guthrie for estimations &#8230; ever.</li>
<li>Scott Guthrie doesn’t use web standards as the web will conform to him.</li>
<li>“It works on my machine” always holds true for Scott Guthrie.</li>
<li>Whiteboards are white because Scott Guthrie scared them that way.</li>
<li>Scott Guthrie doesn’t do Burn Down charts, he does Smack Down charts.</li>
<li>Scott Guthrie can delete the Recycling Bin.</li>
<li>Scott Guthrie’s red polo shirt can type 140 wpm.</li>
<li>Scott Guthrie can unit test entire applications with a single assert.</li>
<li>Scott Guthrie doesn’t bug hunt as that signifies a probability of failure, he goes bug killing.</li>
<li>Scott Guthrie’s keyboard doesn’t have a Ctrl key because nothing controls Scott Guthrie.</li>
<li>When Scott Guthrie is web surfing, websites get the message “Warning: Internet Explorer has deemed this user to be malicious or dangerous. Proceed?”.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.npathweb.com/2009/09/24/watch-out-chuck-norris-scott-guthrie-is-in-town/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Using gridview controls as an asyncPostBackTrigger</title>
		<link>http://www.npathweb.com/2009/09/21/using-gridview-controls-as-a-asyncpostbacktrigger/</link>
		<comments>http://www.npathweb.com/2009/09/21/using-gridview-controls-as-a-asyncpostbacktrigger/#comments</comments>
		<pubDate>Mon, 21 Sep 2009 15:32:46 +0000</pubDate>
		<dc:creator>B.Harding</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.npathweb.com/?p=76</guid>
		<description><![CDATA[Adding an async postback trigger in an aspx page requires you to specify the control ID.  The problem is that the control ID is generated dynamically for items in a gridview row. Not to worry you can still use them.
Open the control&#8217;s onLoad event and add it there using the control&#8217;s Unique ID as the [...]]]></description>
			<content:encoded><![CDATA[<p>Adding an async postback trigger in an aspx page requires you to specify the control ID.  The problem is that the control ID is generated dynamically for items in a gridview row. Not to worry you can still use them.</p>
<p>Open the control&#8217;s onLoad event and add it there using the control&#8217;s Unique ID as the AsyncPostpacktrigger&#8217;s ControlID. Done! The unique ID is the instance&#8217;s ID as opposed to the ID which is the controls name in the template. ClientID is is similar to the Unique ID except it&#8217;s fro the client side.</p>
<p>protected void lbDelete_Load(object sender, EventArgs e)<br />
{<br />
LinkButton btn = (LinkButton)sender;<br />
udpError.Triggers.Add(new  AsyncPostBackTrigger{  ControlID=btn.UniqueID, EventName=&#8221;click&#8221;});</p>
<p>}</p>
]]></content:encoded>
			<wfw:commentRss>http://www.npathweb.com/2009/09/21/using-gridview-controls-as-a-asyncpostbacktrigger/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>My job hunt brain-dump</title>
		<link>http://www.npathweb.com/2009/09/07/my-job-hunt-brain-dump/</link>
		<comments>http://www.npathweb.com/2009/09/07/my-job-hunt-brain-dump/#comments</comments>
		<pubDate>Tue, 08 Sep 2009 04:27:58 +0000</pubDate>
		<dc:creator>B.Harding</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.npathweb.com/?p=71</guid>
		<description><![CDATA[A couple of weeks ago I began working as a Web Developer for the American Motorcyclist Association. To me this is a big deal because I have the actual title of &#8220;Web Developer&#8221;. I love it. It&#8217;s a dream job. Nice people, nice gear, nice facilities and they have an adequate budget, I get benefits [...]]]></description>
			<content:encoded><![CDATA[<p>A couple of weeks ago I began working as a Web Developer for the American Motorcyclist Association. To me this is a big deal because I have the actual title of &#8220;Web Developer&#8221;. I love it. It&#8217;s a dream job. Nice people, nice gear, nice facilities and they have an adequate budget, I get benefits and paid over time. WooHoo! Getting here has been a bit of a journey. I&#8217;ve just come off a 3 month period of un-employment. It was hell but everything turned out well in the end.</p>
<p>10%+  of the population is still unemployed in my state so if you are in a similar situation here is what I have learned:</p>
<p>1.) Get as many interviews as possible. Each interview is valuable experience and practice. If you mess up learn from it and fix it next time.  An introvert like me needs lots of practice. Take any one you can get even if you know you don&#8217;t want that particular job.</p>
<p>2.) Sell yourself! The first half of the interview is usually them explaining the job and selling it to you. If you want the job you need to explain how your skills make you a good fit. It sounds simple and obvious but if you want the job ask for it. Enthusiasm is a good thing. Act like your selling the Sham-Wow.</p>
<p>3.) DO NOT B.S. If they ask you a question and you don&#8217;t know the answer, say so.  If you answer wrong it&#8217;s over in their mind. I fudged some answers in an interview once and there was an email rejection letter in my in-box by the time I got home. Some interviewers suck at interviewing and rely on technical questions. That&#8217;s probably a red flag but still don&#8217;t B.S.</p>
<p>4.) Wear a suit and get a hair cut. Hopefully this goes without saying but you never know. You need to look like a professional. The company is about to invest a lot of money in you. You need to look like you have it together.</p>
<p>5.) Be early. Get there 15 minutes early. The interview is probably your first impression. Don&#8217;t blow it. Mapquest the route the night before, get a Garmin, what ever. Take extra copies of your resume and have references printed up and ready.</p>
<p>6.)  Don&#8217;t rely on monster. If you see a posting on Monster or dice use it as a lead.  Try to figure out the  company&#8217;s website based on their  email domain.  Go to their website, look up the HR director and call them . Ask to speak with the hiring manager.  Get on that phone.</p>
<p>7.) Craig&#8217;s list is your friend. I was surprised to find out how many good jobs were posted on Craig&#8217;s list. It makes sense though I guess. Craig&#8217;s list is free. Monster costs hundreds of dollars. I found my job though Craig&#8217;s list.</p>
<p>8.)LinkedIn. Recruiters are now starting to use LinkedIn to find people. Make sure your on it. Get some references out there.</p>
<p>9.) Get good at the cover letter. Download as many examples as you can find. Study them and master the cover letter. It&#8217;s just as important as your resume. This, for me, was why job hunting was a full time job. Each resume sent should have a custom written cover  letter explaining how you are a good fit for the posting.</p>
<p>10.) Have an answer. When you are asked a question in an interview, answer it in specifics. For example &#8220;what kind of environment are you looking for?&#8221;. &#8220;Any kind&#8221; is a bad answer. This is where doing your home work comes in.  If it&#8217;s a big shop you don&#8217;t want to say you are looking for something small. But it&#8217;s more about confidence than anything.</p>
<p>11.) Be ready for rejection. It&#8217;s bound to happen so don&#8217;t let it get you down. Interviewing is hard on both sides.  Just do the best you can, be confident, be positive. Try to learn from every failure. It&#8217;s not enought to say the guy interviewing you was an idiot. You have to develop an idiot strategy for the next time you come across one.No matter how well you do, you could have none better. More eye contact, less mono-tone, firmer handshake, act less nervous, something&#8230;</p>
<p>12.) There is such a thing as over-qualified. When things get really bleak you may find yourself looking at jobs you are over qualified for. I would try to avoid that. They are likely to reject you. It defies logic! I got rejected for every single job I was overqualified for. Many times I was more qualified that the hiring manager. If you  are  trying to downgrade your job and settle for something you may want to alter your resume.  Leave off the Master&#8217;s degree if you applying for a level-one help desk job. There&#8217;s nothing wrong with getting a little desperate when money is tight but it led to a lot of disappointment for me.</p>
<p>Well that&#8217;s it. I hope nobody needs any of this. If you do, Best of luck!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.npathweb.com/2009/09/07/my-job-hunt-brain-dump/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Restore failed for Server ./SQLEXPRESS</title>
		<link>http://www.npathweb.com/2009/02/12/restore-failed-for-server-sqlexpress/</link>
		<comments>http://www.npathweb.com/2009/02/12/restore-failed-for-server-sqlexpress/#comments</comments>
		<pubDate>Thu, 12 Feb 2009 16:49:02 +0000</pubDate>
		<dc:creator>B.Harding</dc:creator>
				<category><![CDATA[SQL server]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[restore]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Management Studio Express]]></category>

		<guid isPermaLink="false">http://www.npathweb.com/?p=61</guid>
		<description><![CDATA[A wise man once told me: &#8220;The quatilty of your life is directly proportional to the quality of your backups&#8221;. I have come to respect this advice greatly. A few weeks ago my dedicated server went down. The incompitent tech support at AIT was unable to get it working again. It took them 16 days [...]]]></description>
			<content:encoded><![CDATA[<p>A wise man once told me: <em>&#8220;The quatilty of your life is directly proportional to the quality of your backups&#8221;</em>. I have come to respect this advice greatly. A few weeks ago my dedicated server went down. The incompitent tech support at AIT was unable to get it working again. It took them 16 days to decide the drive was toast. All data was lost.  Luckily I was somewhat prepared and had been genrating .bak files on a different server daily. But if a backup that can&#8217;t be restored it&#8217;s useless.  The wise man always followed his advice with <em>&#8220;always do a test restore&#8221;</em>.</p>
<p>This is where the error of today&#8217;s post comes into play.  I was restoring from a .bak file on my local machine to sql express when the following error appeared:</p>
<p><img class="alignnone size-full wp-image-64" title="restoreerror12" src="http://www.npathweb.com/wp-content/upLoads/2009/02/restoreerror12.jpg" alt="restoreerror12" width="621" height="173" /></p>
<h6>For the Search engines:<br />
Restore failed for Server &#8216;.\SQLEXPRESS&#8217;<br />
The backup set holds a backup of a database other than the existing &#8216;clientDB&#8217; database.</h6>
<p>Was my quality of life not what I once thought it was?  Hold on a minute&#8230;</p>
<p>I decided to check the options on the restore. Low and behold there were a few settings that made the restore work like a charm.<br />
First I check replace database then I made sure the filenames were in the right spot. All was right with the world. Inner peace restored.</p>
<p><img class="alignnone size-full wp-image-65" title="restoreoptions" src="http://www.npathweb.com/wp-content/upLoads/2009/02/restoreoptions.jpg" alt="restoreoptions" width="704" height="632" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.npathweb.com/2009/02/12/restore-failed-for-server-sqlexpress/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Fun with site migration</title>
		<link>http://www.npathweb.com/2009/02/11/fun-with-site-migration/</link>
		<comments>http://www.npathweb.com/2009/02/11/fun-with-site-migration/#comments</comments>
		<pubDate>Wed, 11 Feb 2009 19:25:11 +0000</pubDate>
		<dc:creator>B.Harding</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[ASP.net]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[VB.Net]]></category>
		<category><![CDATA[Visual Studio 2007]]></category>

		<guid isPermaLink="false">http://www.npathweb.com/?p=58</guid>
		<description><![CDATA[
Here is my latest headache:
Server Error in &#8216;/&#8217; Application.


A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 &#8211; Error [...]]]></description>
			<content:encoded><![CDATA[<p><span><br />
Here is my latest headache:</span></p>
<h1>Server Error in &#8216;/&#8217; Application.</h1>
<h1>
<hr size="1" /></h1>
<h2><em>A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 &#8211; Error Locating Server/Instance Specified)</em></h2>
<p>I recently migrated my dedicated server from the worthless company AIT to the cloud computing division of RackSpace. As a result I had to move my SQL database. No Problem I thought. I&#8217;ll just edit my web.config and go about my merry business. Well that is when the above error appeared.  This peticular site is dynamically compiled VB site with code in the aspx pages. (no code behind).</p>
<p>The data access layer is handled by some dataset files with XSD extentions. I found that when the files were created the web config connections strings were coppied but not dynamically linked. Each table adpter&#8217;s connection sting needed pointed at the web config again. The process was slow due to the now-remote database.</p>
<p>Now that the table adapters have updated their connection strings all is well.<em><br />
</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.npathweb.com/2009/02/11/fun-with-site-migration/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
