Tried that, same results. I've tried just about anything with null in
it...
DBNull
DBNull.value
The null field of the SqlTypes structures
The command always replaces the null with default
> Use:
>
> System.DBNull.Value
>
> ___________________________________________
> doug seven | sr. developer | dotnetjunkies.com
> Learn ASP.NET - Read the books...
> Programming Data-Driven Web Applications with ASP.NET
> http://www.amazon.com/exec/obidos/ASIN/0672321068/dotnetjunkies-20/
> ASP.NET: Tips, Tutorials and Code
> http://www.amazon.com/exec/obidos/ASIN/0672321432/dotnetjunkies-20/
> Professional ADO.NET
> http://www.amazon.com/exec/obidos/ASIN/186100527X/dotnetjunkies-20/
>
>
>
> -----Original Message-----
> From: Brandon Levitt [mailto:levittbr@m...]
> Sent: Wednesday, November 28, 2001 5:51 PM
> To: ASPX_Professional
> Subject: [aspx_professional] passing null values to an sqlCommand
>
>
> I have a VB.Net method that creates a sqlCommand object and the
parameters
> associated with a stored proc. I want to send null as one of the
> parameter values. However, when I set the parameter.value property
> System.DBNull, sql profiler shows that the sql 'default' keyword is used
> instead. So, how do I send my stored proc the value null?
> ---
> VBug Winter Conference 2001
>
> Make no mistake - there's a great learning curve
> for developers moving from COM to .NET. So why
> would you want to be a pioneer and cross the bridges
> first? Attend the .NET Developer's Conference
> (28th to 30th November 2001) In London and realise
> the benefits of adopting the technology early. By
> attending you'll understand the key challenges and
> be left with a thorough understanding of the major
> .NET fundamentals. If you're already working
> with .NET this is a must-attend event.
>
> http://www.vbug.co.uk/redirect.asp?url=39&id=17
>
> ---
> You are currently subscribed to
> aspx_professional as: doug.seven@d...
> $subst('Email.Unsub')
> Read the future with ebooks at B&N
> http://service.bfast.com/bfast/click?
bfmid=2181&sourceid=38934667&categoryid
> =rn_ebooks
>