• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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,
 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
Ranch Hand
Posts: 1514
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic