getParameterCount Returns Incorrect Parameter Count with 12c Driver (Doc ID 2075575.1)

Last updated on SEPTEMBER 21, 2017

Applies to:

JDBC - Version 12.1.0.1.0 to 12.1.0.2.0 [Release 12.1]
Information in this document applies to any platform.

Symptoms

After upgrading JDBC driver to 12.1.0.x, getParameterCount() returns the number of columns instead of the number of parameters in SQL statement.

 Example:

The output is "1" with the above program, even when the number of bind variables is "2".

Changes

 Upgrade JDBC Driver to 12c.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms