I see some reasons for this. The first of them is that the type of data Image
will be removed in some future version of SQL Server.(MSDN) Data types ntext, text and image will be removed in a future version of Microsoft SQL Server
The Image
library System.Drawing
is not equivalent to the field Image
Sql Server, and they didn’t do any "mapping" for it. I agree that it would even be simpler, however, it is not difficult to convert an image into an array of bytes:
public byte[] imageToByteArray(System.Drawing.Image imageIn)
{
MemoryStream ms = new MemoryStream();
imageIn.Save(ms,System.Drawing.Imaging.ImageFormat.Gif);
return ms.ToArray();
}
System.Drawing.Imaging.ImageFormat.Gif
you substitute for whatever format your image is. (MSDN) Image Formats. I removed this code from Stackoverflow.com (question 17352061)
All the more, this field image
contains nothing more than Dados binários do comprimento variável de 0 a 2^31-1 (2.147.483.647) bytes.
, how you cite the first msdn link I sent.
I hope I helped. As for example, take a search on google, it is very easy to find.
I see there 2 questions, a good and an improper.
– epx