Retrieving images from SQL CE

G

Guest

hi everyone, i have been trying to retrieve the image, but to no avail.

Dim fileimage As New Bitmap(filename)

The problem is that to display the image i need to get the data in an image or a file format and currently i am getting the data from the reader and i don't know how to change it to an image or a file type.
Will be waiting for some replies! Thank u
 
A

Alex Feinman [MVP]

From the reader you are getting a byte array. Build a MemoryStream on top of
it and use New Bitmap(Stream)

--
Alex Feinman
---
Visit http://www.opennetcf.org
Saba said:
hi everyone, i have been trying to retrieve the image, but to no avail.

Dim fileimage As New Bitmap(filename)

The problem is that to display the image i need to get the data in an
image or a file format and currently i am getting the data from the reader
and i don't know how to change it to an image or a file type.
 
G

Guest

Thanks, the filestream i was using wasn't working, the memorystream works fine. Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top