Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- boolean flag=false;
- do{
- System.out.println("Introduza o Username:");
- String user=Ler.umaString();
- System.out.println("Introduza a Password");
- String passwd = Ler.umaString();
- stmt = con.createStatement();
- rs = stmt.executeQuery("SELECT * FROM Colaboradores WHERE Username='" +user+ "' AND Password="+passwd);
- colaboradorID=rs.getInt("Id");
- if(!rs.next())
- {
- System.out.println("Username e/ou password incorretos, tente novamente!\n");
- }
- else
- {
- flag=true;
- }
- }while (flag==false);
Add Comment
Please, Sign In to add comment