I got the following error while testing some code:
SQLException: Invalid column index
What exactly does that mean?
Is
It sounds like you're trying to SELECT
a column that doesn't exist.
Perhaps you're trying to ORDER BY
a column that doesn't exist?
Any typos in your SQL statement?
I also got this type error, problem is wrong usage of parameters to statement like, Let's say you have a query like this
SELECT * FROM EMPLOYE E WHERE E.ID = ?
and for the preparedStatement object (JDBC) if you set the parameters like
preparedStatement.setXXX(1,value);
preparedStatement.setXXX(2,value)
then it results in SQLException: Invalid column index
So, I removed that second parameter setting to prepared statement then problem solved