Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 510
  • Last Modified:

VB.Net Display Images From MSSQL

I have a load of images stored in a mssql database as binary, I can read them out and store them as a file then tell the picturebox to load the file. Is there a way to load directly into a picturebox (i.e. creating an image from the binary stream).

Would like solution from having read the data into a variable -> setting pictureBox.abc = def, or reference to a page that shows how it can be done! :)

2 Solutions

just call

picImage.Image =  Image.FromStream(ms);                                    

picImage  is your picturebox control, ms is the stream containing the image

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now