Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem with while loop when ResultSet.next() is called

 
shanthi naidu
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello sir/friends,

I am retrieving values from database using ResultSet.next() ... it already executed program in one system..now i am trying to combine all the modules in another system ..i have created the required database for the application and also compiled successfully...but when i click on submit button after entering the username and the password i am getting a blank page...the problem is it is not entering the while block...



I am using tomcat5.5 and java 1.5.. for reference i am providing the code also...please suggest me any solution.. this problem is with some servlet programs only.. other servlet programs done on the other systems are successfully executed...






thank you'
Shanthi Naidu
 
aswin kumar
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
have you checked the table ,if there any records exist in that table or not. Just put System.out.println("Records Exist"+rs.next()); for checking purpose.

regards,
 
Venki Ananth
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Shanthi!

Do you have any data. Please Check your table and DB Connection! Print
rs.getString(1) and check!
 
Bosun Bello
Ranch Hand
Posts: 1511
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since you said the same exact code is working on another system, this is environment related. Check your logs, do the tables exist, is the data in the table? I hope you get the idea.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic