Tuesday, 15 July 2014

Display the BLOB objects in Coldfusion -


I have a query that receives data from Oracle DB. The table I am retrieving contains a Blob type column when I used it as the output

  & lt; Cfoutput & gt; # Query.blob column # & lt; / Cfoutput & gt;  

This is giving me the error "BiteAir objects can not be converted to string". I

  & lt; Cfoutput & gt; #ToString (query.blobColumn) # & lt; / Cfoutput & gt; Have tried to use.  

Then it works, but I'm getting the content as "t".

Is there a way that we can display some Blob file (XML) and if the user clicks on it, can we display / download the entire content?

This is the code I use

   #CharsetEncode (UpdatesArtult [ColName] [UpdateResult.CurrentRow], "ISO-8859-1") # & lt; / Td> & Lt; Cfelse & gt; & Lt; TD & gt; #UpdateResult [ColName] [UpdateResult.CurrentRow] # & lt; / TD & gt; & Lt; / Cfif> & Lt; / Cfloop & gt; & Lt; / TR & gt; & Lt; / Cfloop & gt; You can try to use the function ` 

You can try to use the function.

  & lt; Cfoutput & gt; #charget encoded (query.blobCoulmn, "us-ascii") # & lt; / Cfoutput & gt; From documentation: 

Adobe suggests that you use this function, and not toring function, to convert binary data into all new applications into strings.

It supports many character sets, us-ascii is only used as an example. Hope it helps!


No comments:

Post a Comment