Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

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: 1512
  • 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.
 
But how did the elephant get like that? What did you do? I think all we can do now is read this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic