SHARE
TWEET

Untitled

a guest Sep 8th, 2017 158 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  // Methode untuk menginsert data node
  2.     public void insertLelang(Object[] data) {
  3.         try {
  4.             String SQLInsert = "INSERT INTO dblelang.lelang (idlelang, namalelang, isilelang, waktu) " +
  5.                     "VALUES ('','" + data[0] + "','" + data[1] + "','" + data[2] + "');";
  6.             int stat = database.exeQuery(SQLInsert);
  7.             if (stat == 0) {
  8.                 JOptionPane.showMessageDialog(null, "Data tidak dapat disimpan");
  9.             }
  10.         } catch (Exception e) {
  11.         }
  12.     }
  13.  
  14.     // Mengedit data di Basis data smsp table node  
  15.     public void editLelang(String id, Object[] data) {
  16.         try {
  17.             String SQLEdit = "UPDATE dblelang.lelang SET namalelang = '" + data[0] + "'," +
  18.                     "isilelang = '" + data[1] + "',waktu = '" + data[2] + "' WHERE lelang.idlelang ='" + id + "'";
  19.             int stat = database.exeQuery(SQLEdit);
  20.             if (stat == 0) {
  21.                 JOptionPane.showMessageDialog(null, "Data tidak dapat diubah");
  22.             }
  23.         } catch (Exception e) {
  24.         }
  25.     }
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