Jon,

Yes, the data is Binary when it comes from the database.  

It just seems to be having problems coming from Sybase.  I can read an image in 
from a file as binary, save it out to a different filename as a binary text 
file, then read it back in again using the method you described.  However, for 
some reason when I read the image in from Sybase, it won't work.  It 
essentially just dumps a lot of garbage (what appears to be binary) to the 
browser.

Thank you Jon for your responses.  Has someone had experience working with a 
BLOB images and Sybase and have any suggestions?

Thanks,
Kevin

 -------------- Original message ----------------------
From: Jon Clausen <[EMAIL PROTECTED]>
> Kevin,
> 
> You may need to convert the image data to Binary in order to stream  
> it if the field is being returned as a string.   Check the value of  
> the data you're getting back:
> 
> <cfdump var="#isBinary(q.image_data)#">
> <cfabort>
> 
> If it dumps false, use toBinary()  to convert the string data.
> 
> I'm sorry, I'm not familiar with Sybase so I don't know how the BLOB  
> data is stored and thus returned.
> 
> Jon
> 
> On Nov 14, 2006, at 11:44 AM, Kevin Cundick wrote:
> 
> > Thanks Jon,
> >
> > I entered the code as you suggested, still all that happens is the  
> > URL is printed to the browser with nothing else.  Seems to be  
> > related to the CFCONTENT tag.  If I just remove the CFCONTENT tag  
> > and "print" the image data to the screen, it does do that.  As soon  
> > as I put the CFCONTENT tag back in I just get the URL.  Ideas?
> >
> > Thanks,
> > Kevin
> >
> >> Kevin,
> >>
> >> Try this:
> >> <cfsilent>
> >> <cfquery name="q" datasource="webdb">
> >> ...Your query here...
> >> </cfquery>
> >> </cfsilent>
> >> <cfheader name="Content-Disposition" value="inline">
> >> <cfcontent type="image/jpg" variable="#q.image_data#"  
> >> reset="false" />
> >>
> >> In CF7, you can stream directly from the database.
> >>
> >> Jon
> >>
> >> On Nov 14, 2006, at 11:52 AM, Kevin Cundick wrote:
> >>
> >>>
> >
> > 
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:260421
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to