SHARE
TWEET

Untitled

a guest Jun 18th, 2019 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. String SerialNumber=textField_2.getText();
  2.  
  3.             String ModelNumber=textField_3.getText();
  4.  
  5.             String Make=textField_4.getText();
  6.             try
  7.             {
  8.                 Connection con=DB.getConnection();
  9.                 Statement ps=con.createStatement();
  10.  
  11.                  ResultSet rs=ps.executeQuery("Select DeviceID,DeviceName,SerialNumber,ModelNumber,Make FROM deviceadd WHERE DeviceID =?");
  12.                  if(rs.next())
  13.                  {
  14.  
  15.                 String ID = rs.getString("DeviceName");
  16.                 textField_1.setText(ID);
  17.                 String FN = rs.getString("SerialNumber");
  18.                 textField_2.setText(FN);
  19.                 String LN = rs.getString("ModelNumber");
  20.                 textField_3.setText(LN);
  21.                 String Des = rs.getString("Make");
  22.                 textField_4.setText(Des);
  23.                  }
  24.  
  25.             }
  26.             catch (SQLException e1)
  27.             {
  28.                 // TODO Auto-generated catch block
  29.                 e1.printStackTrace();
  30.             }
  31.         }
  32.  
  33.     });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top