Hello Programmers, Now i came to preparedStatement and here i m updating some values but it shows me an exception....
I'm having one doubt about updating values to preparedStatement "should i want to initialize the all column names which are in emp5 table for updating values ?"
CODE SNIPPET
output java.sql.SQLException: Parameter index out of range (3 > number of parameters, which is 2).
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:998)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:937)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:926)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:872)
at com.mysql.jdbc.PreparedStatement.checkBounds(PreparedStatement.java:3367)
at com.mysql.jdbc.PreparedStatement.setInternal(PreparedStatement.java:3352)
at com.mysql.jdbc.PreparedStatement.setString(PreparedStatement.java:4078)
at demojdbc.MysqlCon.main(MysqlCon.java:21)