Reading Clobs > 32K
Dean Hogan, April 23, 2002 - 10:17 am UTC
Tom, thanks for your prompt response. Would you be able to give me an example of pl/sql code, which processes clobs in 32k chunks?
Returning CLOB
Prashant, April 21, 2006 - 7:08 pm UTC
Hi Tom,
I have a problem returning XML back to my front end application.
My Architecture is like following.
I have stored procedure which generates XML with TAG in a CLOB object. And returns CLOB to the front end application
And the front the application is able to display the data correctly.
But the it fails when i have more data in my CLOB.
Is there any general rule for this.
Front end application is of Java based.
Thanks & Regards
Prashant
April 22, 2006 - 3:07 pm UTC
the general rule is
java has no problems with using clobs, therefore your code is likely "incorrect"
given what you've given us to work with here, that is about the most we can say in response
Returning CLOB
Prashant, April 22, 2006 - 11:24 pm UTC
Hi Tom,
Please find the following code which just calls a stored procedure which return a CLOB object.
declare
l_len number;
v_ret_clob CLOB:=' ';
begin
Orcl_Proc_Ctrl_4_Xml.EXECUTE_CONTROL(v_ret_clob);
l_len := dbms_lob.getlength(v_ret_clob);
dbms_output.put_line('the return size OF CLOB------> '||l_len);
end;
Following way i am getting output for above PL/SQL block.
the return size OF CLOB------> 113906
But the above CLOB is not being displayed by front end.
Thanks
Prashant
April 23, 2006 - 5:29 am UTC
"sorry"
since "front end" is a rather vague term and could in fact mean just about ANYTHING at all.
you do not give any example to work with here.
Returning CLOB- Solved
Prashant, April 24, 2006 - 8:33 pm UTC
Hi Tom,
Today the Return CLOB was Solved And solution was from Java Front Side.
The developer was using some Read function instead of bufferreader so front end application can now show CLOB more than 32 K.
Thanks a lot
Thanks & Regards
Prashant Pathak
Return of Table Type Record
Prashant Pathak, May 09, 2006 - 2:36 pm UTC
Hi Tom,
I am trying to make one general function which will generate the XML CLOB depending on data given.
What i have?
I have 10 procedure which generates 10 XML CLOB. All 10 XML CLOB has different table type. I mean one table type has 10 column and in another procedure a table type is having 9 column.
so in all 10 procedure i have a common code to popupate the XML CLOB. which looks like
Procedure_1003
.
.
.
for l_counter in 1..1003_tbl.count
loop
dbms_lob.append
( p_out_xml, '<ROW num="'|| l_counter || '">'||'<Operating_Unit_Name>'|| ' ' || 1003_tbl(l_counter).l_operating_unit_name||'</Operating_Unit_Name>' ||'<Inventory_Organization_Code>' || ' '|| 1003_tbl(l_counter).l_inventory_organization_code</Inventory_Organization_Code>' ||
end loop;
.
.
.
Procedure_1004
.
.
for l_counter in 1..1004_tbl.count
loop
dbms_lob.append
( p_out_xml, '<ROW num="'|| l_counter || '">'||'<Operating_Unit_Name>'|| ' ' || 1004_tbl(l_counter).l_operating_unit_name||'</Operating_Unit_Name>' ||'<Inventory_Name>' || ' '|| 1004_tbl(l_counter).l_inventory_Name</Inventory_Name>' ||
||'<Price>' || ' '|| 1004_tbl(l_counter).Price</Price>' ||
end loop;
.
.
so in 10 different procedure i have a bit same code for generating XML.
Now i want to pass the table type to a procedure which can generate the XML CLOB with tag.
in each procedure i have fixed column but across the procedure column varies.
So my difficulties is how to pass these different table type record to a common procedure which can take all these table type record and generate XML CLOB.
Thanks
Prashant