Guest User

Untitled

a guest
Jun 22nd, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. public int CheckExistingCitizen(String s)
  2. {
  3. int i = 0;
  4. try {
  5. String sql = "SELECT IDNUMBER from CITIZENS where IDNUMBER='"+s+"'";
  6. ResultSet apantiseis = this.stmt.executeQuery(sql);
  7.  
  8. while ( apantiseis.next() )
  9. {i++;}
  10.  
  11. } catch (SQLException ex) {
  12. Logger.getLogger(Dbconnection.class.getName()).log(Level.SEVERE, null, ex);
  13. }
  14.  
  15. return i;
  16. }
Add Comment
Please, Sign In to add comment