Skip to main content
WolfShade
Legend
February 18, 2015
Question

ByteArray objects cannot be converted to strings... CFIMAGE

  • February 18, 2015
  • 2 replies
  • 1833 views

Hello, everyone,

I'm working on a project that another developer created many moons ago.  I'm attempting to SELECT a blob from an Oracle db, and use CFIMAGE action="writeToBrowser" to display the image.

<CFIMAGE action="writeToBrowser" source="#qry.IMAGEDATA#" format="png" />

It's giving me the error message "ByteArray objects cannot be converted to strings".  The datatype IS "BLOB", not varchar.

I'm running CF10 update 15 on a Windows7 system, with Oracle 11g.  Am I missing a step, somewhere?

V/r,

^_^

    This topic has been closed for replies.

    2 replies

    BKBK
    Community Expert
    Community Expert
    March 7, 2015

    What about this instead:

    source="#imageNew(qry.IMAGEDATA)#"

    WolfShade
    WolfShadeAuthor
    Legend
    March 9, 2015

    Ah.. hmm.. hadn't thought of that, actually.  When I can, I'll give that a shot and report back.  Thank you!

    V/r,

    ^_^

    Inspiring
    February 19, 2015

    Did you enable the BLOB setting in your Coldfusion datasource?

    WolfShade
    WolfShadeAuthor
    Legend
    March 2, 2015

    BLOB and CLOB are both enabled.

    ^_^

    UPDATE:  And the memory for both has been increased x100.