• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Verification of Password in JDBC

 
Ranjeet Deshmukh
Ranch Hand
Posts: 35
Eclipse IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I'm doing JDBC with Mysql 5.2, I'm storing my password using md5 encryption. Program should show error message when wrong password is entered. Tell me what to write to replace "?" in if().

My code is:-




 
amit punekar
Ranch Hand
Posts: 544
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
Please let us know what do you plan to put in if and then probably we can figure out whats going on.


regards,
amit
 
Paul Clapham
Sheriff
Posts: 21322
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You want to find out whether the database query returned any rows? Then calling "rs.next()" at that point will try to read the first row, and return true if the first row was found.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic