Retrieve Images stored in OLE Objects to ASP page
am 22.12.2006 00:55:28 von zachhale
We are storing images into the SQL database with the column type of
"Image" using Access and it is storing all of the images as "OLE
Object". I am trying to spit out the binary data of the Image part of
the OLE Object to an asp .net page so I can view it as a jpeg image.
I have found many tutorials for setting the response.contenttype and
then response.binarywrite the byte[] of binary data, but the problem is
that the binary data isn't just the image, but rather an OLE Object
which is the image plus a bunch of metadata. I need to somehow decode
the OLE Object to extract JUST the jpeg image from it for outputting as
a byte[] array.
I am tearing my hair out with this problem and greatly appreciate any
help. Thanks!
Re: Retrieve Images stored in OLE Objects to ASP page
am 22.12.2006 18:35:14 von Jon Paal
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?ln gWId=4&txtCodeId=6108
wrote in message news:1166745327.912287.15440@f1g2000cwa.googlegroups.com...
> We are storing images into the SQL database with the column type of
> "Image" using Access and it is storing all of the images as "OLE
> Object". I am trying to spit out the binary data of the Image part of
> the OLE Object to an asp .net page so I can view it as a jpeg image.
>
> I have found many tutorials for setting the response.contenttype and
> then response.binarywrite the byte[] of binary data, but the problem is
> that the binary data isn't just the image, but rather an OLE Object
> which is the image plus a bunch of metadata. I need to somehow decode
> the OLE Object to extract JUST the jpeg image from it for outputting as
> a byte[] array.
>
> I am tearing my hair out with this problem and greatly appreciate any
> help. Thanks!
>