Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Boolean returned from PL/SQL to java under oracle 12

User_P9WRFJul 17 2018 — edited Jul 19 2018

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...

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Aug 16 2018
Added on Jul 17 2018
1 comment
1,576 views