This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC 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

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Verification of Password in JDBC" Watch "Verification of Password in JDBC" New topic

Verification of Password in JDBC

Ranjeet Deshmukh

Joined: Jan 18, 2013
Posts: 24

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

Joined: May 14, 2004
Posts: 511
Please let us know what do you plan to put in if and then probably we can figure out whats going on.

Paul Clapham

Joined: Oct 14, 2005
Posts: 18541

You want to find out whether the database query returned any rows? Then calling "" at that point will try to read the first row, and return true if the first row was found.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: Verification of Password in JDBC
Similar Threads
prog of multiple inputs
endless loop with nothing happening
Reading from XML file
how to write data into access database?
java.sql.SQLException: No suitable driver found for jdbc:mysql//localhost:3306/emp