标签:
在ORACLE中CLOB与Clob是有区别的类型。
(oracle.jdbc.internal.OracleCallableStatement)OracleCallableStatement能接收CLOB的数据类型,
(java.sql.CallableStatement)CallableStatement能接收Clob的数据类型。
CODE示例
PACKAGE
CREATE OR REPLACE PACKAGE BODY cux_supp_approval_report_pkg IS PROCEDURE test_lower_clob(p_parameter_id IN NUMBER, x_out_xml OUT CLOB) IS l_temp_str VARCHAR2(32767); l_temp_clob CLOB; BEGIN dbms_lob.createtemporary(x_out_xml, TRUE); l_temp_str := ‘<?xml version="1.0" encoding="GBK"?>‘ || fnd_global.newline; dbms_lob.writeappend(lob_loc => x_out_xml, amount => length(l_temp_str), buffer => l_temp_str); END; PROCEDURE test_upper_clob(p_parameter_id IN NUMBER, x_out_xml OUT CLOB) IS l_temp_str VARCHAR2(32767); l_temp_clob CLOB; BEGIN dbms_lob.createtemporary(x_out_xml, TRUE); l_temp_str := ‘<?xml version="1.0" encoding="GBK"?>‘ || fnd_global.newline; dbms_lob.writeappend(lob_loc => x_out_xml, amount => length(l_temp_str), buffer => l_temp_str); END; END;
标签:
原文地址:http://www.cnblogs.com/huanghongbo/p/4884918.html