How to deal java.sql.SQLException: Invalid column index

Tutorials Shared by the Internet Community

Advertisements


Synopsis

Main reason of SQLException:Invalid Column Index is either you are trying to read an invalid column index from result set returned by Query or you are

Statistics

  • Total Hits - 28335

  • Total Votes - 122 votes

  • Vote Up - 53 votes

  • Vote Down - 69 votes

  • Domain - javarevisited.blogspot.com

  • Category - JAVA/JDBC

  • Submitted By - Javin Paul

  • Submitted on - 2012-02-05 05:16:24

Description

Main reason of SQLException:Invalid Column Index is either you are trying to read an invalid column index from result set returned by Query or you are setting parameter on parametric prepared Statement on invalid index using getString or setString method. usually this comes when programmer uses index "0" to refer first element which is not true because index starts from "1" in preparedStatement and ResultSet. ...


Site  |   Broken  |   Tweet  |   Facebook  |     |   Save  |   Liked  |   Down

Advertisements