Advertisement
Guest User

Untitled

a guest
May 5th, 2016
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. String host ="jdbc:derby://localhost:1527/UserData";
  2. String DBusername="mohammad";
  3. String DBpassword="0598087382";
  4. String userName=lblApplicantName.getText();
  5. Connection cn = DriverManager.getConnection(host,DBusername, DBpassword);
  6. String command ="UPDATE MOHAMMAD.USERTABLE SET ISACCEPTED =TRUE WHERE USERNAME='"+userName+"'";
  7. Statement stmt =cn.createStatement();
  8. stmt.execute(command);
  9. stmt.close();
  10. cn.close();
  11.  
  12. logIN.cellNo[cellIndex]=0;
  13. cellIndex++;}
  14.  
  15.  
  16. catch (SQLException e) {
  17. JOptionPane.showMessageDialog(null, e.getMessage(),"can't connect to DataBase",0);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement