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

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 - 49112

  • Total Votes - 137 votes

  • Vote Up - 60 votes

  • Vote Down - 77 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.

Source Website

Please use the following link to visit the site. There is a possibility that this content has been removed from the given URL or may be this site has been shut down completely.

http://javarevisited.blogspot.com/2012/01/javasqlsqlexception-invalid-column.html

Broken  |   Save  |   Liked  |   Down

Advertisements