Announcement Announcement Module
Collapse
No announcement yet.
Param of type PL/SQL Index Table Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Param of type PL/SQL Index Table

    I have a PL/SQL stored procedure that takes 2 parameters of type PL/SQL TABLE. Nothing that I've passed it to this parameter seems to work. I've tried passing arrays and I get an "Invalid column type" error. I know for sure that the arrays are initialized and each element in the arrays have values.

    Am I passing the correct objects for this to work or is there something else going on that I'm not aware of?

    The class for my stored procedure is:

    private class UpdateRates extends StoredProcedure {

    protected UpdateRates(DataSource ds) {
    setSql("PKG_RATES.UPDATE_RATES");
    setDataSource(ds);
    declareParameter(new SqlParameter("I_DPPR_ID", OracleTypes.NUMBER));
    declareParameter(new SqlParameter("I_PARN_PR", OracleTypes.NUMBER));
    declareParameter(new SqlParameter("I_PR_ID", OracleTypes.NUMBER));
    declareParameter(new SqlParameter("I_EFF_FRM", OracleTypes.DATE));
    declareParameter(new SqlParameter("I_EFF_TO", OracleTypes.DATE));
    declareParameter(new SqlParameter("I_DPRT_ID", OracleTypes.NUMBER));
    declareParameter(new SqlParameter("I_DPRT_SEQ", OracleTypes.PLSQL_INDEX_TABLE));
    declareParameter(new SqlParameter("I_RATE_TAB", OracleTypes.PLSQL_INDEX_TABLE));
    }

    protected Map execute(long dpprId, long parnPr, long prId, Date effFrom, Date effTo, long dprtId, Long[] sequences, String[] rates) {

    Map inputs = new HashMap();
    inputs.put("I_DPPR_ID", dpprId);
    inputs.put("I_PARN_PR", parnPr);
    inputs.put("I_PR_ID", prId);
    inputs.put("I_EFF_FRM", effFrom);
    inputs.put("I_EFF_TO", effTo);
    inputs.put("I_DPRT_ID", dprtId);
    inputs.put("I_DPRT_SEQ", sequences);
    inputs.put("I_RATE_TAB", rates);
    return execute(inputs);
    }
    }
Working...
X