Ok, I fixed the problem. Took me so long :( Instead of only assigning imgByte when I do have file I assign it even if I don't put any image. In this case it automatically creates 0 based byte array.
>>Hi everybody,
>>
>>I'm getting this error "Implicit conversion from data type nvarchar to varbinary(max) is not allowed. Use the CONVERT function to run this query."
>>
>>I pass NULL as my parameter for varbinary(max). In the stored procedure code I use ISNULL(@DefaultPicture, CONVERT(varbinary(max),''))
>>
>>What should I do to fix the problem?
>>
>>Thanks in advance.
>
>
> ISNULL(@DefaultPicture, CONVERT(varbinary(max),0x0))
>
>
>or even:
>
> ISNULL(@DefaultPicture, 0)
>
If it's not broken, fix it until it is.
My Blog