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

前端 未结 5 1993
没有蜡笔的小新
没有蜡笔的小新 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:40

    I think here is the issue

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

    you called from java as above, But you declared in procedure out parameter as varchar2,that means there is a mismatch of datatype.

    Try this code,

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

    I hope this will work..

提交回复
热议问题