Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8108223
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T01:02:26+00:00 2026-06-06T01:02:26+00:00

I am trying to retrieve CLOB data from our Oracle database. the code is

  • 0

I am trying to retrieve CLOB data from our Oracle database. the code is the following:

<cfstoredproc datasource="#request.site.datasource#" procedure="GETPAGESWITHMETADATA" result="myResults">
    <cfprocparam cfsqltype="CF_SQL_VARCHAR" type="in" value="News">
    <cfprocparam cfsqltype="CF_SQL_VARCHAR" type="in" value="News Pages">
    <cfprocparam cfsqltype="CF_SQL_CLOB" type="out" variable="XML">
    <cfprocresult name="rs1">
</cfstoredproc>
<cfdump var="#myResults#">
<cfoutput>#XML#</cfoutput>
<cfcatch type="any">
    <cfdump var="#cfcatch#">
</cfcatch>
</cftry>

Basically, the output of the stored procedure is:

select dbms_xmlquery.getxml(queryCtx) INTO XML from dual;

I checked the data sources on the server and the “Enable long text retrieval (CLOB).” option is checked for every data source.

Surprisingly, instead of getting the XML result on screen, I get a very short string:
[C@74897f5e

It looks like a handle id instead of the content itself.

How can I retrieve the complete content of the XML?

For reference, the data source is using macromedia drivers with TNS name:
Driver class: macromedia.jdbc.MacromediaDriver

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T01:02:28+00:00Added an answer on June 6, 2026 at 1:02 am

    As @MarkAKruger suggested, returning a table from the procedure solved the issue.
    The following PL/SQL code did the trick:

    create or replace
    PACKAGE PCK_Commonspot
    AS
    type t_clob IS record (metadata CLOB) ;
    type t_clob_tab IS TABLE OF t_clob;
    FUNCTION GetPagesWithMetadataAsRS(FormName varchar2, CategoryName varchar2)
        RETURN t_clob_tab pipelined;
    END PCK_Commonspot;
    

    The package body contains the following code:

    FUNCTION GetPagesWithMetadataAsRS(FormName varchar2, CategoryName varchar2)
        RETURN t_clob_tab pipelined
    IS
        r t_clob;
     BEGIN
        GETPAGESWITHMETADATA(FormName, CategoryName, r.metadata) ;
        pipe row(r) ;
        RETURN;
    END;
    

    The function GETPAGESWITHMETADATA is the one returning a CLOB into r.metadata
    Here, the trick is around returning a piped table.

    It becomes super nice on the ColdFusion side because the call is really simple:

    <cfquery name="Test" datasource="myDS" maxrows="1">
        SELECT * FROM TABLE(PCK_Commonspot.GetPagesWithMetadataAsRS('abc','def'))
    </cfquery>
    <cfset XML = Xmlparse(Test.Metadata)>
    

    Thanks Mark!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Iam trying to retrieve data from mysql database into stylesheet.php but it is not
Hi i am trying to retrieve data from mysql database to create flot graph
Trying to retrieve data using linq from a database. I would like to use
trying to retrieve some data from the database and put in into my form.
I am trying retrieve user name from the code through graph api, the below
Trying to retrieve related data from the relationships table, after user clicks on the
Im trying to retrieve some data from JSON object which holds location information such
I am trying to retrieve a few things from the database with just one
I'm trying to retrieve data from http://api.freebase.com/api/trans/raw/m/0h47 As you can see in text there
I am trying to retrieve JSON formatted data from a remote domain (Zencoder video

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.