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的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: UPDATE关联表
- 下一篇: exec 和 call 用法详解