>I have defined a field of type Binary(16). The field holds a byte value.
>
>If I do a select command, SqlParameter.SqlDbType will return Binary. However, if I do an update command, SqlParameter.SqlDbType returns VarBinary.
>
>Can someone explain me why this is like that?
>
>I need to have a universal way of recognizing the type. Should I always add my parameter with a type VarBinary so to end up with the same recognition at either a select or update command?
It is better to have parameter's type matching the column's type. So explicitly define the parameter to be binary type in the parameter's declaration.
If it's not broken, fix it until it is.
My Blog