0
点赞
收藏
分享

微信扫一扫

java call oracle procudure setBoolean问题PLS-00306: wrong number or types of arguments in call to

独兜曲 2023-07-02 阅读 57


java代码如下 可能是不能传递boolean型参数所致,大家有什么好方法没有?谢谢

try {
     clstmt = conn.prepareCall("{? = call my_test(?,?,?)}");
     clstmt.registerOutParameter(1, Types.VARCHAR);
     clstmt.setString(2, "1111111");
     clstmt.setBoolean(3, false);
     clstmt.registerOutParameter(4, Types.VARCHAR);
     clstmt.execute();
 } catch (SQLException e) {
     System.out.println(e.getMessage());
 }




 java.sql.SQLException: ORA-06550: line 1, column 7:
 PLS-00306: wrong number or types of arguments in call to 'IU_DELTA_STAGE_CLEANUP'
 ORA-06550: line 1, column 7:
 PLS-00306: wrong number or types of arguments in call to 'IU_DELTA_STAGE_CLEANUP'
 ORA-06550: line 1, column 7:
 PL/SQL: Statement ignored

         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:743)
         at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:212)
         at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:951)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1160)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3285)
         at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3390)
         at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4223)
         at pkg_test.main(pkg_test.java:31)

=====================

oracle 最后会把true翻译成1,false 翻译成0, 都是number类型

举报

相关推荐

0 条评论