Author: funluckykitty | Posted on: 1/23/2009 9:13:01 AM | Views : 2248

I"m getting this error as part of an insert into sql in my vb.net CodeBehind.  I have a if/then statement, and in this portion of the statement, I need to pass in a null value for one of the parameters.  Here's my code behind.. how do I add the parameter (Caption), but have it's value set for NULL in the db? 

comm.Parameters.AddWithValue("Caption", "")   <----  If I use this, it inserts a space, which I don't want...
comm.Parameters.Add("Caption")   <----  If I use this, it throws the error 



...

Go to the complete details ...