<?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. &#187; SQL</title>
	<atom:link href="http://www.npathweb.com/tag/sql/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>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>6</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>4</slash:comments>
		</item>
		<item>
		<title>Operator &#8216;==&#8217; incompatible with operand types &#8216;Int32&#8242; and &#8216;Object&#8217;</title>
		<link>http://www.npathweb.com/2009/02/05/operator-incompatible-with-operand-types-int32-and-object/</link>
		<comments>http://www.npathweb.com/2009/02/05/operator-incompatible-with-operand-types-int32-and-object/#comments</comments>
		<pubDate>Thu, 05 Feb 2009 16:49:52 +0000</pubDate>
		<dc:creator>B.Harding</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Errors]]></category>
		<category><![CDATA[Linq]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Visual Studio 2007]]></category>

		<guid isPermaLink="false">http://www.npathweb.com/blog/?p=5</guid>
		<description><![CDATA[I had this error pop up on me recently.

Operator &#8216;==&#8217; incompatible with operand types &#8216;Int32&#8242; and &#8216;Object&#8217;
I had an good grasp on why but the stack track would not tell me where!
The issue is that a null object was being used in a where clause somewhere. Linq translated the null as &#8220;&#8221; and could not [...]]]></description>
			<content:encoded><![CDATA[<p>I had this error pop up on me recently.</p>
<p><span></p>
<h2><em>Operator &#8216;==&#8217; incompatible with operand types &#8216;Int32&#8242; and &#8216;Object&#8217;</em></h2>
<p></span>I had an good grasp on why but the stack track would not tell me where!</p>
<p>The issue is that a null object was being used in a where clause somewhere. Linq translated the null as &#8220;&#8221; and could not be compared the the ID field which is an int.</p>
<p>My solution was to simply check each key and cancel the action if there is a null value.</p>
<p>Since I couldn&#8217;t tell which Linq Data source was crashing I wired up on selecting events for them ALL and put the following code in:</p>
<p><span style="font-size: x-small;"> </span></p>
<p><span style="color: #0000ff; font-size: x-small;">foreach</span><span style="font-size: x-small;"> (</span><span style="color: #2b91af; font-size: x-small;">KeyValuePair</span><span style="font-size: x-small;">&lt;</span><span style="color: #0000ff; font-size: x-small;">string</span><span style="font-size: x-small;">, </span><span style="color: #0000ff; font-size: x-small;">object</span><span style="font-size: x-small;">&gt; kvp </span><span style="color: #0000ff; font-size: x-small;">in</span><span style="font-size: x-small;"> e.WhereParameters)<br />
</span><span style="font-size: x-small;">{</span></p>
<p><span style="color: #0000ff; font-size: x-small;"> if</span><span style="font-size: x-small;"> (kvp.Value == </span><span style="color: #0000ff; font-size: x-small;">null</span><span style="font-size: x-small;">){</span></p>
<p><span style="font-size: x-small;"> e.Cancel = </span><span style="color: #0000ff; font-size: x-small;">true</span><span style="font-size: x-small;">;</span></p>
<p><span style="color: #0000ff; font-size: x-small;"> return</span><span style="font-size: x-small;">;</span></p>
<p><span style="font-size: x-small;"> }</span></p>
<p><span style="font-size: x-small;">}</span></p>
<p><span style="font-size: x-small;"> </span></p>
<p><span style="font-size: x-small;">Problem solved.</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.npathweb.com/2009/02/05/operator-incompatible-with-operand-types-int32-and-object/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
