Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. If UCase$(pTransJns) = "ADD" Then
  2.         gstrSQL = "Insert Into siswa (nis, nama, jeniskelamin, tempatlahir, tanggallahir, agama, namaortu) Values ('" & Text2.Text & "', '" & Text3.Text & "', '" & CBOJEKEL.Text & "', '" & Text4.Text & "', '" & TANGGALLAHIR.Value(TANGGALLAHIR.Value, "YYYY-MM-DD") & "', '" & CBOAGM.Text & "', '" & Text5.Text & "')"
  3.         Cn.Execute (gstrSQL)
  4. ElseIf UCase$(pTransJns) = "EDIT" Then
  5.         Cn.Execute (gstrSQL)
  6. End If
  7. '----------------Yang di atas itu ubah jadi dibawah ini (Formaddsis)--------------------------------
  8. If UCase$(pTransJns) = "ADD" Then
  9.         gstrSQL = "Insert Into siswa (nis, nama, jeniskelamin, tempatlahir, tanggallahir, agama, namaortu) Values ('" & Text2.Text & "', '" & Text3.Text & "', '" & CBOJEKEL.Text & "', '" & Text4.Text & "', '" & Format(TANGGALLAHIR.Value, "YYYY-MM-DD") & "', '" & CBOAGM.Text & "', '" & Text5.Text & "')"
  10.         Cn.Execute (gstrSQL)
  11.  ElseIf UCase$(pTransJns) = "EDIT" Then
  12.         gstrSQL = "update siswa set nis = '" & Text2.Text & "', nama = '" & Text3.Text & "', jeniskelamin = '" & CBOJEKEL.Text & "', tempatlahir = '" & Text4.Text & "', tanggallahir = '" & Format(TANGGALLAHIR.Value, "YYYY-MM-DD") & "', agama = '" & CBOAGM.Text & "', namaortu = '" & Text5.Text & "' WHERE idsiswa ='" & txtID.Text & "'"
  13.         Cn.Execute (gstrSQL)
  14. End If
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement