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

Tutorials Shared by the Internet Community

Advertisements

  Top Tutorials     New Tutorials     Submit     Login     Register  

Tutorial Detail

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

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
http://javarevisited.blogspot.com/2012/01/javasqlsqlexception-invalid-column.html
  • Total Hits: 22154

  • Average Rating :
    URL RatingURL RatingURL RatingURL RatingURL Rating

  •  

  • Total Votes: 155 votes

  • Category: JAVA/JDBC

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

  • Submitted By: Javin Paul

  • Set as Favorite

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.    More detail...

Rating Detail

 Stars  Percentage  Total Vote
 One star  Vote LeftVote MiddleVote Right 38.71%  60
 Two starsTwo star  Vote LeftVote MiddleVote Right 10.32%  16
 Three starsThree starsThree stars  Vote LeftVote MiddleVote Right 12.26%  19
 Four starsFour starsFour starsFour stars  Vote LeftVote MiddleVote Right 9.68%  15
 Five starsFive starsFive starsFive starsFive stars  Vote LeftVote MiddleVote Right 29.03%  45

Caste Your Vote

 Rating  Selection  Guidelines
 Poor:     Very disappointing, useless.
 Fair:     Below average, disappointing but not useless.
 Good:     About average in its class.
 Very Good:     Above average for its category.
 Excellent:     One of the best Tutorials in its category.






Advertisements