<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Invalid Use of Default Parameter</title>
	<atom:link href="http://blog.stevex.net/2005/11/invalid-use-of-default-parameter/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.stevex.net/2005/11/invalid-use-of-default-parameter/</link>
	<description>Software development and other notes.</description>
	<lastBuildDate>Tue, 15 Jun 2010 13:44:34 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Jeremy</title>
		<link>http://blog.stevex.net/2005/11/invalid-use-of-default-parameter/comment-page-1/#comment-453968</link>
		<dc:creator>Jeremy</dc:creator>
		<pubDate>Fri, 31 Oct 2008 16:30:23 +0000</pubDate>
		<guid isPermaLink="false">http://blog.stevex.net/index.php/2005/11/16/invalid-use-of-default-parameter/#comment-453968</guid>
		<description>Note that if you&#039;re using an ADO Command object and parameterising a query in VBScript ASP Classic, you&#039;ll get this message if you&#039;re passing the wrong type of null value to a column that DOES allow nulls. By default, if you leave the value of a parameter unset, it&#039;ll be set to the special value DBNull, which is defined in VBScript; contrary to other types of .NET programming, you have to use the regular VBScript null value:

if (Request.form(&quot;email&quot;)  &quot;&quot;) then
            .parameters(&quot;Email&quot;).value = Request.form(&quot;email&quot;)
        else
            .parameters(&quot;Email&quot;).value = null
        end if

If you didn&#039;t have the &quot;else&quot; there, the value would default to DBNull and fail with the above error.</description>
		<content:encoded><![CDATA[<p>Note that if you&#8217;re using an ADO Command object and parameterising a query in VBScript ASP Classic, you&#8217;ll get this message if you&#8217;re passing the wrong type of null value to a column that DOES allow nulls. By default, if you leave the value of a parameter unset, it&#8217;ll be set to the special value DBNull, which is defined in VBScript; contrary to other types of .NET programming, you have to use the regular VBScript null value:</p>
<p>if (Request.form(&#8220;email&#8221;)  &#8220;&#8221;) then<br />
            .parameters(&#8220;Email&#8221;).value = Request.form(&#8220;email&#8221;)<br />
        else<br />
            .parameters(&#8220;Email&#8221;).value = null<br />
        end if</p>
<p>If you didn&#8217;t have the &#8220;else&#8221; there, the value would default to DBNull and fail with the above error.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
