mdbarker813
asked on
Displaying an image from a SQL Database without creating a file on the hard drive.
I'd like to load an image from a SQL database without creating a file on the hard drive. It there a way to do this?
Use MemoryStream class instead of FileStream. Load image from database to MemoryStream. Create Bitmap from MemoryStream using Bitmap(Stream) constructor and display it.
ASKER
Do you have any sample code?Or do you know where I may find some?
This is C# sample:
http://www.codeproject.com/cs/database/albumviewer.asp
See code fragment: "Display the image". I will try to find VB .NET sample which does the same.
http://www.codeproject.com/cs/database/albumviewer.asp
See code fragment: "Display the image". I will try to find VB .NET sample which does the same.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.