I am validating if a resultset is empty. if it is empty send a message, but if you have data to show them. But he only sends me the second value, the first one is lost
if (!rs.next()){
JOptionPane.showMessageDialog(null, "The rs is empty");
}else{
while(rs.next()) {
OptionPane.showMessageDialog(null, rs.getString(1));**//only show the second data**
}
}