I want to pass array of string to producer. due to i created new Type like bellow.
CREATE OR REPLACE TYPE arrayOfVchr is TABLE of VARCHAR2(100);
and I passed array of string to producer like bellow.
sp.declareParameters(new SqlParameter("v_array",OracleTypes.ARRAY,"arrayOfVCHR"),
);
and and added value to it as like this:
map.addValue("v_array", list,OracleTypes.ARRAY); //or list.toArray()
but when i execute sp it throw exception.
java.sql.sqlexception fail to convert to internal representation
I'm using spring jdbc
JdbcTemplate jdbcTemplate = new JdbcTemplate(dataSource);
jdbcTemplate.setResultsMapCaseInsensitive(true);
SimpleJdbcCall sp= new SimpleJdbcCall(jdbcTemplate);