public String validateUser(String inputUserid
throws SQLException{
String returnString = null;
String dbUserid =
String dbPassword =
Class
Connection con = DriverManager
dbUserid
Statement stmt = con
String sql=
inputUserid +
ResultSet rs = stmt
if (rs
{
returnString = rs
}
stmt
con
return returnString ;
From:http://tw.wingwit.com/Article/program/Java/hx/201311/26419.html