Advertisement
Guest User

Untitled

a guest
Apr 17th, 2016
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. String sql="select * from userpassword where username=? and password=?";
  2. pst = (OraclePreparedStatement) con.prepareStatement(sql);
  3. pst.setString(1,text_username.getText());
  4. pst.setString(2,pass_password.getText());
  5. rs = (OracleResultSet) pst.executeQuery();
  6. if(rs.next()){
  7.  
  8. text_username.setText("");
  9. pass_password.setText("");
  10. ModulesForm Mo = new ModulesForm();
  11. Mo.setVisible(true);
  12. }
  13. else{
  14. JOptionPane.showMessageDialog(null, "enter valid username and id !!!");
  15. }
  16. con.close();
  17. }catch(Exception e){
  18. JOptionPane.showMessageDialog(null, "some error occured. try again later !!!");
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement