ResultSet rs = MySqlBean.executeQuery(sql);
while(rs.next()){
if((rs.getString(“username”).compareTo(usr)==0)&&(rs.getString(“password”).compareTo(pwd)==0)){
validated = true;
}
rs.close();
}
//ResultSet closes in a while loop with an error Operation not allowed after ResultSet closed