Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- If UCase$(pTransJns) = "ADD" Then
- 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 & "')"
- Cn.Execute (gstrSQL)
- ElseIf UCase$(pTransJns) = "EDIT" Then
- Cn.Execute (gstrSQL)
- End If
- '----------------Yang di atas itu ubah jadi dibawah ini (Formaddsis)--------------------------------
- If UCase$(pTransJns) = "ADD" Then
- 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 & "')"
- Cn.Execute (gstrSQL)
- ElseIf UCase$(pTransJns) = "EDIT" Then
- 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 & "'"
- Cn.Execute (gstrSQL)
- End If
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement