I have a vgridcontrol of devexpress that contain a row for save user profile picture. How do I save images to the database?
When this code runs:
Image image = vgridcontrol.getcellvalue(row_photo, 0) as Image;
Image is null. Any ideas?
I have a vgridcontrol of devexpress that contain a row for save user profile picture. How do I save images to the database?
When this code runs:
Image image = vgridcontrol.getcellvalue(row_photo, 0) as Image;
Image is null. Any ideas?
Images are stored in a byte arrays, so you can simply save your byte array to SQL without converting to
Image
.If you want to get the
Image
from byte array then you can get it fromMemoryStream
which is filled by your byte array: