I have a PictureEdit in my form and a button to save this PictureEdit.Image to an SQL DataBase.
I wrote this code :
Byte[] imgData = new ImageConverter().ConvertTo(auteurPhoto.Image, typeof(Byte[])) as Byte[];
row[11] = imgData == null ?
DBNull.Value :
imgData as Object;
But the problem when there is no picture in the PictureEdit.Image it store the value 0x on the Image’s column and I want to store the NULL value !
try
instead.