I have the following code: I am getting the following error message:
Operand type clash: nvarchar is incompatible with image
when the code tries to do: cmd.ExecuteNonQuery();
Note that I get this error only when _ImageB
is null
. ImageB
is stored as a Image Data type in the SQL Server table.
if (_ImageB == null)
{
cmd.Parameters.AddWithValue("@ImageB", DBNull.Value);
}
else
{
cmd.Parameters.AddWithValue("@ImageB", _ImageB);
}