Strange Error: ORA-17041: Missing IN or OUT parameter at index 13
651838Jul 24 2008 — edited Jul 24 2008Hi,
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?