3h1fT/InpresZone_JAVA — Issue #1: Java Array mapping to Oracle PL/ SQL table of Varchar2
Author: 3h1fT
Created: 2011-10-19 15:08:44+00:00
State: open

Couldn't for now give a Java Array of String to a Storage Oracle PL/ SQL Procedure which take a PL/ SQL Table of Varchar2.

There is the part of code which doesn't work:

if (p.getSubtitles() != null) {
ArrayDescriptor shelfStructDesc = ArrayDescriptor.createDescriptor("TABLE_SOUS_TITRE", this.oracleConnection);
ARRAY shelfStruct = new ARRAY(shelfStructDesc, this.oracleConnection, p.getSubtitles().toArray());
this.psMovie.registerOutParameter(24, OracleTypes.ARRAY);
this.psMovie.setArray(24, shelfStruct);
}
else
this.psMovie.setNull(24, java.sql.Types.ARRAY);