java

0 emma musungu · February 9, 2015

private void txt_barcodeKeyReleased(java.awt.event.KeyEvent evt) {

try{
String sql="select * from prod_mast where barcode=?" ;
pst=conn.prepareStatement(sql);
pst.setString(1,txt_barcode.getText());

rs=pst.executeQuery();
if(rs.next()){
String add1 = rs.getString("item_des");
txt_description.setText(add1);
String add2 = rs.getString("retail1");
txt_price.setText(add2);


}



}catch(Exception ex){
JOptionPane.showMessageDialog(null, ex);


}

}



Post a Reply

Replies

Oldest  Newest  Rating
0 Branislav Lazic · February 9, 2015
What would be a question?
  • 1

Java / Android Development

106,910 followers
About

Very popular language used to create desktop applications, website applets, and Android apps.

Links
Moderators
Bucky Roberts Administrator