Hi,
I have a table that has a before insert trigger. The trigger stores a value from another table in the first column. I include values for all columns minus the first one for my sql insert.
I get the error:
java.sql.SQLException: Missing IN or OUT parameter at index:: 1
I think it means I need to include one more column for the insert. How do I do it for the first column with trigger?
Thanks.
String fields[] = new String[8];
int i = 1;
sql = "INSERT into TBL_LOGS VALUES(?,?,?,?,?,?,?,?)";
PreparedStatement ps = connection.prepareStatement(sql);
//loop
//ps.setString(i+1, fields[i]);
int rs = ps.executeUpdate();