• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

while (rs.next()) not stopping at EOF.

 
Brian K Swingle
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,
I am using a MySql database. and am using a while(rs.next()) statement to loop through the result set. i watch tomcats activity through a command prompt window. I have a System.out.println(""+RecordNumber+""); set up so i can see what record number the Resultset is on. my table has 1962 records and after the Resultset loops unitl it hits record number 1962 it errors with java.lang.NullPointerException . I'm guessing that it means the ResultSet is trying to move to the next record but there isn't one. Can anyone give me any ideas as to why this might be happening. The servlet just started doing this. Any help is greatly appreciated.
Thanks,
brian
 
Joe Ess
Bartender
Posts: 9313
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How's about sharing the exact code that is giving you a problem?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic