Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Retrieving Binary/BLOB from Oracle using CF8

Explorer ,
Mar 06, 2012 Mar 06, 2012

Hi all, I hope someone can shed some light on an issue I'm having.  We've been running CF6/CF7/CF8 in succession on many different versions of Oracle.  I've been storing binary files in the database and retrieving them without any issues.  I've been doing it like this (a working example, pretend this is inside a cffunction):

<cfset var returnStruct = StructNew()>

<cfquery name="get" datasource="#dsn#">

SELECT doc FROM #usr#.documents WHERE doc_id=1

</cfquery>

<cfset returnStruct["document"] = get.doc>

Up until the last Oracle upgrade I could do <cfdump var=#returnStruct#> and see there is binary stored.  Now, when I do a cfdump I'm getting an empty string -- not even a binary.  When I run the query against the database itself I'm still getting the BLOB so it's something between CF and Oracle that isn't playing nicely.  I haven't had any luck finding anyone else with this issue.  I don't know the Oracle patch version (I've asked so I should know soon), but it's something recent for 11g.

If anyone has any ideas or spots what I'm doing wrong, please let me know.  I've been doing it this way for many years so I'm not sure how else to do it.  Thanks!

1.5K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Explorer , Mar 07, 2012 Mar 07, 2012

I just heard from another team with the same issue and they found the fix.  ColdFusion needs a driver update.  The Oracle update to 11.2.0.3 will not allow ColdFusion to retrieve binary data without updating ColdFusion drivers.  Hopefully that information helps someone.

Translate
Contributor ,
Mar 06, 2012 Mar 06, 2012

Please try to change the queryname and run it.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 07, 2012 Mar 07, 2012

Sorry, that's just a working example and not my entire function.  It's in a CFC so the query name is a local variable.  This function has been in place for years and it worked well -- the only change is the Oracle upgrade.  Does anyone do this sort of thing in a different way that I could try?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 07, 2012 Mar 07, 2012
LATEST

I just heard from another team with the same issue and they found the fix.  ColdFusion needs a driver update.  The Oracle update to 11.2.0.3 will not allow ColdFusion to retrieve binary data without updating ColdFusion drivers.  Hopefully that information helps someone.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources