欢迎访问 生活随笔!

生活随笔

当前位置: 首页 >

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

发布时间:2024/4/17 45 豆豆
生活随笔 收集整理的这篇文章主要介绍了 java call oracle procudure setBoolean问题PLS-00306: wrong number or types of arguments in call to 小编觉得挺不错的,现在分享给大家,帮大家做个参考.

http://www.itpub.net/forum.php?mod=viewthread&action=printable&tid=1186364

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类型

总结

以上是生活随笔为你收集整理的java call oracle procudure setBoolean问题PLS-00306: wrong number or types of arguments in call to的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得生活随笔网站内容还不错,欢迎将生活随笔推荐给好友。