Saving image to MSSQL image field

Been trying to save an image to the MSSQL database’s image field and found out that there are two different file size utilized when saving it from:

1. Loaded image to Picturebox and saving the picturebox’s image back to database by converting it to memory, back to byte. (1440054 byte)
2. Saving the image directly from file using filestream to read the file, loading it into memory then convert it to byte. (105543 byte)
3. Loaded image to Picturebox and saving the picturebox’s image back file and from file using filestream to read the file, loading it into memory then convert it to byte. (106655 byte)

Original file size: 103kb

Comparing all the three, method number 2 seemed to be the right choice but I am shocked to know the size being utilized when trying method #1.

Written by admin on November 30th, 2009 with no comments.
Read more articles on Knowledge Base and Personal and Programming.

Related articles

No comments

There are still no comments on this article.

Leave your comment...

If you want to leave your comment on this article, simply fill out the next form:




You can use these XHTML tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> .