Hello,
I have a database application using Java Stored Procedure which is running on a 11g.
I'm about to migrate the application to 12c
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Advanced Analytics,
Real Application Testing and Unified Auditing options
ORACLE_HOME = /opt/oracle/product/rdbms/12.1.0
System name: Linux
Release: 3.10.0-327.el7.x86_64
Version: #1 SMP Thu Oct 29 17:29:29 EDT 2015
Machine: x86_64
but on the new database the code starts to throw
java.sql.SQLException: Invalid column index
This is the the code causing the problem:
- sqlStatement = "select fk from table where pk = ?";
- PreparedStatement pstmt = getConnection().prepareCall(sqlStatement);
- pstmt.setBigDecimal(1, idPassedAsMethodParameter);
- ResultSet rs = pstmt.executeQuery();
The problematic code is really this simple! It is located in a public static Method.
Why does 12c refuse to work with this code?
bye
TPD