Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Fabiana Ferrrari   on Feb 01 In Java Category.

  
Question Answered By: Damon Jones   on Feb 01

Remove rs.next() before the while loop. Anyway rs.next() is there in while loop
condition, it will work.

Instead of checking with while loop you can do the following

Sql = query="select * from Registration where username=<username> and password  =
<password>";

If (rs.next()) return  true;
else return false;

Share: 

 

This Question has 1 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on problem in bean Or get search suggestion and latest updates.


Tagged: