overcome 32k limit when inserting oracle clob IN parameter using spring StoredProcedure -
environment: oracle 11g, spring-jdbc-3.2.2-release.jar, jdk 1.7, oracle ucp driver.
i have stored procedure insert record table clob column. sp has clob input argument among other in , out arguments. java code uses spring storedprocedure call stored procedure:
public class myclass extends storedprocedure { public myclass(){ ..... declareparameter(new sqlparameter("content", types.clob)); ..... } public void insert(){ hashmap<string,object> params = new hashmap<string, object>(37); string bigcontent = ....; // contains ascii chars in test .... params.put("content", new sqllobvalue(bigcontent)); .... execute(params); } }
the code works fine if bigcontent has < 32k chars. if bigcontent has, 50k, chars, didn't work. tested using jdbctemplate , sqllobvalue insert table directly, works fine bigcontent has 50k chars.
i want use sp whole bunch of other stuff , more efficient invoking multiple sql insert, update, , query statements separately.
anyone know how work sp? or limit have handle differently if bigcontent has > 32k chars?
pl/sql has hard limit of 32k chars if send data character string. if parameter clob can first create temp lob, fill data , call pl/sql procedure clob object.
Comments
Post a Comment