kondakindi
IS-IT--Management
Hi,
I Have created a normal table in oracle and a arraytype xx-type of varchar2(255) in oracle..
I have wriiten a procedure in to insert values into the table in oracle using the array type.
In java when i call that procedure and create a orcale.sql.array type and give the connection and descriptor and oracle.sql.array type it gives thet following error:
Error :
setArray(int,java.sql.Array) in java.sql.PreparedStatement
cannot be applied to (int,oracle.sql.ARRAY)
cstms.setArray (2, colValue);
The follwoing is the code..
CallableStatement cstms=null;
String procedureCall = "{call INSERT_BASE_SURVEY(?,?,?,?, ?, ?)}";
cstms = insert_oracleKonnection.getCon().prepareCall(procedureCall);
ArrayDescriptor in_arr = new ArrayDescriptor("SURVEY_ARRAY",insert_oracleKonnection.getCon());
oracle.sql.ARRAY colName = new oracle.sql.ARRAY(in_arr,insert_oracleKonnection.getCon(),columnName);
oracle.sql.ARRAY colValue = new oracle.sql.ARRAY(in_arr,insert_oracleKonnection.getCon(),columnValue);
cstms.setArray (1, colName );
cstms.setArray (2, colValue);
cstms.setString (3, APP_NAME);
cstms.setString (4, httpSessionID);
cstms.setString (5, inucid);
cstms.registerOutParameter(6, java.sql.Types.VARCHAR);
cstms.executeQuery();
Do i have to set up a path for this i have set the path for classes111.zip and classes12.zip
Do let me know what is my error.
Thanks,
I Have created a normal table in oracle and a arraytype xx-type of varchar2(255) in oracle..
I have wriiten a procedure in to insert values into the table in oracle using the array type.
In java when i call that procedure and create a orcale.sql.array type and give the connection and descriptor and oracle.sql.array type it gives thet following error:
Error :
setArray(int,java.sql.Array) in java.sql.PreparedStatement
cannot be applied to (int,oracle.sql.ARRAY)
cstms.setArray (2, colValue);
The follwoing is the code..
CallableStatement cstms=null;
String procedureCall = "{call INSERT_BASE_SURVEY(?,?,?,?, ?, ?)}";
cstms = insert_oracleKonnection.getCon().prepareCall(procedureCall);
ArrayDescriptor in_arr = new ArrayDescriptor("SURVEY_ARRAY",insert_oracleKonnection.getCon());
oracle.sql.ARRAY colName = new oracle.sql.ARRAY(in_arr,insert_oracleKonnection.getCon(),columnName);
oracle.sql.ARRAY colValue = new oracle.sql.ARRAY(in_arr,insert_oracleKonnection.getCon(),columnValue);
cstms.setArray (1, colName );
cstms.setArray (2, colValue);
cstms.setString (3, APP_NAME);
cstms.setString (4, httpSessionID);
cstms.setString (5, inucid);
cstms.registerOutParameter(6, java.sql.Types.VARCHAR);
cstms.executeQuery();
Do i have to set up a path for this i have set the path for classes111.zip and classes12.zip
Do let me know what is my error.
Thanks,