wood burning stoves 2.0*
The moose likes JDBC and the fly likes problem with while loop when ResultSet.next() is called Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "problem with while loop when ResultSet.next() is called" Watch "problem with while loop when ResultSet.next() is called" New topic
Author

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

shanthi naidu
Ranch Hand

Joined: Nov 13, 2008
Posts: 39
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

Joined: Dec 25, 2008
Posts: 12
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

Joined: Dec 17, 2008
Posts: 32
Hello Shanthi!

Do you have any data. Please Check your table and DB Connection! Print
rs.getString(1) and check!


Venki
http://saalram.com
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1510
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.


Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem with while loop when ResultSet.next() is called
 
Similar Threads
with out authentication it is forwading to another page
Servlet Query
How to separate Business Logic from the servlet
Connection reset by peer:JVM_recv in socket input stream read
from servlet i want to use Ms Access