Forum Stats

  • 3,768,991 Users
  • 2,252,892 Discussions
  • 7,874,830 Comments

Discussions

Boolean returned from PL/SQL to java under oracle 12

2897567
2897567 Member Posts: 9

Can you call a stored procedure which returns boolean from JDBC?

This states that "JDBC drivers do not support returning values with datatype BOOLEAN" and refers to "oracle 11 and later".  Also the 11 docs agree stating "It is not feasible for Oracle JDBC drivers to support calling arguments or return values of the PL/SQL RECORD, BOOLEAN, or table with non-scalar element types."


However, the corresponding 12c docs, under "Oracle JDBC Notes and Limitations" has all the same sub-sections as 11 except that it omits the "PL/SQL TABLE, BOOLEAN, and RECORD Types" section altogether.  So, is it supported in 12 or not?

Then again, the 11.c docs list BOOLEAN as a supported PL/SQL data type (but as a character type?) while the corresponding 12 docs don't.

My initial tests indicate not, but while I'm using a 12.2 JDBC I'm testing against an 11 DB at the moment.  Will try a 12 at some point.

I must say, I really cannot understand how boolean is not supported.  If the driver wants to treat it as one and zero internally, fine, but it is literally the simplest possible data type - how it it not "feasible" to support is beyond me...

Tagged:

Answers

  • 2897567
    2897567 Member Posts: 9
    edited Jul 19, 2018 10:09AM

    I also found this for 12.1 which states _"The ability for Java and JDBC applications to bind PL/SQL package types and boolean types as parameters is available in this release."_  is this JDBC12 or a 12c Database or both?  Will it work with both?

This discussion has been closed.