This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes Verification of Password in JDBC Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Verification of Password in JDBC" Watch "Verification of Password in JDBC" New topic
Author

Verification of Password in JDBC

Ranjeet Deshmukh
Ranch Hand

Joined: Jan 18, 2013
Posts: 35

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:-





~R@njeet.
amit punekar
Ranch Hand

Joined: May 14, 2004
Posts: 540
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

Joined: Oct 14, 2005
Posts: 19726
    
  10

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.
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: Verification of Password in JDBC
 
It's not a secret anymore!