Skip to Main Content

SQL & PL/SQL

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!

Strange Error: ORA-17041: Missing IN or OUT parameter at index 13

651838Jul 24 2008 — edited Jul 24 2008
Hi,

perhaps anybody has an idea on how to get rid of that not explainable error. Error occurs in combination of Websphere 6 and Oracle 10.2.0.3, using JDBC Thin Driver.

String sql =
"INSERT INTO TBLAUSBILDUNG (STRAUABSCHLUSSA, STRLASTCHANGENAME, SSTRAUIDENT, STRAUABSCHLUSSJAHR, STRAUAUSBILDUNGSGANGE, STRAUAUSBILDUNGSGANGD, STRAUAUSBILDUNGSGANGA, STRLASTCHANGEIDENT, SSTRAUIDENTAUSBILDUNG, DTMLASTCHANGEDATE, STRAUABSCHLUSSE, STRAUABSCHLUSS) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";

When using
PreparedStatement stmt = conn.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS);
to get the auto generated keys back after all 12 parameters have been set the error occurs while executeUpdate is performed. Note that there are only 12 parameters so where does the 13 come from?

When using
PreparedStatement stmt = conn.prepareStatement(sql);
without trying to get the auto generated keys back everything works fine!


Any suggestions/solutions?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 21 2008
Added on Jul 24 2008
1 comment
16,848 views