Calling an Oracle PL/SQL procedure in Java using a CallableStatement with a boolean IN parameter gives an PLS-00306 oracle error:

前端 未结 5 1965
没有蜡笔的小新
没有蜡笔的小新 2021-02-19 17:59

I have a pl/sql procedure on an Oracle 11g that has the following parameters:

PROCEDURE validate_product
   ( product_id_in IN varchar2 , 
     username_in in va         


        
5条回答
  •  我在风中等你
    2021-02-19 18:19

    I suspect the out statements might need modification to the following (since the type of the out parameters is varchar2 in the procedure):-

    cstmt.registerOutParameter(6, Types.VARCHAR); 
    cstmt.registerOutParameter(7, Types.VARCHAR); 
    

    However, if that does not work, then try modifying the prepareCall statement to the following also :-

    cstmt = getConnection().prepareCall("{call " + DBUtil.SCHEMANAME + ".PRODUCT_UTILITIES.validate_product(?,?,?,?,?,?,?)}");
    

提交回复
热议问题