Are you just trying to render the image on a web page?
This is some old CF7 stuff I have:
<cfsetting enablecfoutputonly="Yes">
<cfsetting showdebugoutput="No">
<!--- Pulls the Picture blob from the users table and returns the image
to the browser. Call this script within the SRC attribute of an image
tag, for example --->
<cfquery name="get_imageBlob" datasource="mydsn">
SELECT picture from table
</cfquery>
<cfheader name="content-disposition" value="Inline;filename=myImage.jpg">
<cfcontent type="image/jpg">
<cfoutput>#tostring(tobinary(get_imageBlob.picture))#</cfoutput>
On 3/14/2011 10:14 AM, BCulpepper wrote:
I have images that are stored as blobs in an MSSQL database. When I
try and do ImageRead(query.ImageBytes) I get:
"Data not supported: Cannot convert binary data to string". Has anyone
else had this issue? Anyone have a work around. I can't move forward
on this project if I can't get this part working.
OpenBD Version: Nightly Build (Downloaded today)
Apache/Tomcat
OS: Mac OS X
Here is a screen shot of the error and query dump:
http://dl.dropbox.com/u/3835711/QueryImage-ScreenShot.jpg
Thank you for any assistance.
- Brandon Culpepper
--
official tag/function reference: http://openbd.org/manual/
mailing list - http://groups.google.com/group/openbd?hl=en