Try digging through some of the threads at the link below. They look like
"K. Wilder" <KWilder@discussions.microsoft.com> wrote in message
news:DDA2F9D5-D583-4FCD-BE71-7BDFEC649D78@microsoft.com...
> Tim,
>
> No, I'm not sure. I don't really know how the Photo binaries in the
> Northwind database are. Is there a way to find out?
>
> Thanks,
>
> King
>
> "Tim Wilson" wrote:
>
> > So it sounds like the MemoryStream may not be holding bytes that
represent a
> > valid image. Again, are you sure that the bytes of the image are stored
> > properly in the byte array?
> >
> > --
> > Tim Wilson
> > ..Net Compact Framework MVP
> >
> > "K. Wilder" <KWilder@discussions.microsoft.com> wrote in message
> > news:2707B3B8-749E-4590-9EFD-82E09BD81B34@microsoft.com...
> > > Tim,
> > >
> > > The error occurs on the line that follows:
> > >
> > > Me.picBox.Image = Image.FromStream(ms)
> > >
> > > I'm assuming its the ms parameter of the FromStream method.
> > >
> > > Also I get an error in my Task List that indicates its a byte array:
> > >
> > > Value of type '1-dimensional array of Byte' cannot be converted to
'Byte'.
> > >
> > > I'm kina frustrated. Any other ideas?
> > >
> > > Thanks,
> > >
> > > King
> > >
> > > "Tim Wilson" wrote:
> > >
> > > > At what point do you get the exception? Are you sure that the
".Photo"
> > value
> > > > represents a Byte array?
> > > >
> > > > --
> > > > Tim Wilson
> > > > ..Net Compact Framework MVP
> > > >
> > > > "K. Wilder" <KWilder@discussions.microsoft.com> wrote in message
> > > > news:060EBEB6-0BDE-4B68-AE26-D6FDAD94ED99@microsoft.com...
> > > > > Tim,
> > > > >
> > > > > I tried your Google example and got an "Invalid parameter used"
error.
> > > > >
> > > > > This is my code:
> > > > >
> > > > > Dim ba() as Byte
> > > > > ba = .Photo
> > > > > Dim ms As New IO.MemoryStream(ba)
> > > > > Me.picBox.Image = Image.FromStream(ms)
> > > > >
> > > > > Any ideas?
> > > > >
> > > > > Thanks,
> > > > >
> > > > > King Wilder
> > > > >
> > > > >
> > > > > "Tim Wilson" wrote:
> > > > >
> > > > > > If the image is in a Byte array then you could create a
MemoryStream
> > > > using
> > > > > > this Byte array, then call the shared FromStream method of the
Image
> > > > class
> > > > > > passing in the MemoryStream. There's some sample code at the
link
> > below.
> > > > > >
> > > > > >
> > > >
> >
http://www.google.ca/groups?hl=en&lr=&selm=erQHZobLEHA.2388%40TK2MSFTNGP09.phx.gbl
> > > > > >
> > > > > > --
> > > > > > Tim Wilson
> > > > > > ..Net Compact Framework MVP
> > > > > >
> > > > > > "K. Wilder" <KWilder@discussions.microsoft.com> wrote in message
> > > > > > news:36DBE9AA-58C0-4FFB-8D22-45F985F49C23@microsoft.com...
> > > > > > > In VB.Net, does anyone know how to load an image from, example
> > > > Northwind
> > > > > > DB
> > > > > > > employees table, to a picture box control?
> > > > > > >
> > > > > > > The Image is in Byte format and I can't figure out how to
convert
> > it
> > > > to an
> > > > > > > image.
> > > > > > >
> > > > > > > Thanks,
> > > > > > >
> > > > > > > King Wilder
> > > > > >
> > > > > >
> > > > > >
> > > >
> > > >
> > > >
> >
> >
> >