CODING JAVA INPUT / SCRIPT JAVA INPUT
try {
String sql = "insert into barang values"
+ " ('"+kode.getText()+"',"
+ "'"+nama.getText()+"')";
// JOptionPane.showMessageDialog(null, query);
Statement stat = conn.createStatement();
int res=stat.executeUpdate(sql);
if(res == 1){
javax.swing.JOptionPane.showMessageDialog(null, "Insert Data Sukses !");
}
}catch (Exception e) {
}