I tried to set the parameter value to system.dbnull.value but got some errors. thanks.
+1
A:
What is happening is that SQLServer is reading the NULL type as nvarchar, which cannot be used to update an Image column.
Try specifying the Parameter Type as SqlDbType.Image
SqlParameter myParam = new SqlParameter("@NameOfParameter",SqlDbType.Image);
Matthew Jones
2009-06-15 21:29:41
A:
An alternative is to not use a parameter when you're setting it to null. Instead, you can hardcode '=null' in the SQL command and skip parameters completely.
Andrew
2009-07-07 08:05:16
This works, but he might be coding this into his datalayer and wants to be able t o set the correct parameter value.
ck
2009-07-07 08:07:40