<?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; Visual Studio 2007</title>
	<atom:link href="http://www.npathweb.com/tag/visual-studio-2007/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>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>
