Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
- try {
- con= DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:XE","NIVT","1234");
- ps=con.prepareStatement("select * from admin where emp_id=?");
- ps.setInt(1, Integer.parseInt(t1.getText()));
- rs=ps.executeQuery();
- while(rs.next())
- {
- t1.setText(rs.getString("emp_id"));
- t2.setText(rs.getString("emp_name"));
- t3.setText(rs.getString("emp_mail"));
- t4.setText(rs.getString("emp_pass"));
- t5.setText(rs.getString("emp_doj"));
- t6.setText(rs.getString("emp_sal"));
- }
- } catch (SQLException ex) {
- Logger.getLogger(EmpUpd.class.getName()).log(Level.SEVERE, null, ex);
- }
Add Comment
Please, Sign In to add comment