Jumat, 04 November 2011

Latihan 29 Apkom 4 D3 B

Silahkan kumpul disini

39 komentar:

  1. Public Class Latihan29035
    Dim go As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source =D:\materi kuliah II\semester 5\VB\LATIHAN 27-34 SIMPAN EDIT DELETE DATA\DATABARANG.accdb")

    Private Sub Button1035_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1035.Click
    'perintah periksa data
    If kb035.Text.Length = 0 Then
    MsgBox("Please Insert Your Text")
    Exit Sub
    End If

    If t1035.Text.Length = 0 Then
    MsgBox("Please Insert Your Text")
    Exit Sub
    End If

    If t2035.Text.Length = 0 Then
    MsgBox("Please Insert Your Text")
    Exit Sub
    End If

    If Val(t3035.Text) = 0 Then
    MsgBox("Please Insert Your Text")
    Exit Sub
    End If

    If Val(t4035.Text) = 0 Then
    MsgBox("Please Insert Your Text")
    Exit Sub
    End If

    'perintah ambil data
    Dim PENCARI As New ByIskandar.CariKeDataBaseByIskandar
    PENCARI.AturPencarianDataBase("BARANG", "KODEBARANG", t1035.Text, 1, go)

    If PENCARI.JumlanBaris > 0 Then
    MsgBox("The data has been exist please insert new data")

    'mengosongkan text box
    kb035.Text = ""
    t1035.Text = ""
    t2035.Text = ""
    t3035.Text = ""
    t4035.Text = ""
    Exit Sub
    End If

    'deklarasi object command
    Dim Cm As New OleDb.OleDbCommand
    Cm = New OleDb.OleDbCommand("Update BARANG set KODEBARANG ='" & t1035.Text & "', NAMABARANG = '" & t2035.Text & "', HARGAJUAL=" & Val(t3035.Text) & ", JUMLAHBARANG=" & Val(t4035.Text) & " where KODEBARANG='" & kb035.Text & "'", go)
    go.Open()
    Cm.ExecuteNonQuery()
    go.Close()
    Cm.Dispose()

    'mengosongkan text box
    kb035.Text = ""
    t1035.Text = ""
    t2035.Text = ""
    t3035.Text = ""
    t4035.Text = ""
    End Sub
    End Class

    BalasHapus
  2. Public Class LATIHAN02936109033
    Dim CONECT As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb")
    Dim cari As New ByIskandar.CariKeDataBaseByIskandar
    Private Sub Button136109033_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button136109033.Click

    If Val(t136109033.Text) = 0 Then
    MsgBox("kode barang belum terisi")
    Exit Sub
    End If

    If t236109033.Text.Length = 0 Then
    MsgBox("nama barang belum terisi")
    Exit Sub
    End If

    If Val(t336109033.Text) = 0 Then
    MsgBox("harga jual belum diisi")
    Exit Sub
    End If

    If Val(t436109033.Text) = 0 Then
    MsgBox("jumlah barang belum diisi")
    Exit Sub
    End If

    cari.AturPencarianDataBase("BARANG", "KODEBARANG", kb36109033.Text, 1, CONECT)

    If cari.JumlanBaris = False Then
    MsgBox("kode tidak ada")
    Exit Sub
    End If

    Dim com As New OleDb.OleDbCommand
    com = New OleDb.OleDbCommand("UPDATE BARANG SET kodebarang = '" & t136109033.Text & "', namabarang = '" & t236109033.Text & "', hargajual = " & Val(t336109033.Text) & ", jumlahbarang = " & Val(t436109033.Text) & " where kodebarang ='" & kb36109033.Text & "'", CONECT)

    CONECT.Open()
    com.ExecuteNonQuery()
    CONECT.Close()
    com.Dispose()

    kb36109033.Text = ""
    t136109033.Text = ""
    t236109033.Text = ""
    t336109033.Text = ""
    t436109033.Text = ""

    End Sub

    End Class

    BalasHapus
  3. revisi :)

    Public Class LATIHAN02936109033
    Dim CONECT As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;Jet OLEDB:Database Password=tahir")
    Dim cari As New ByIskandar.CariKeDataBaseByIskandar
    Private Sub Button136109033_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button136109033.Click

    If Val(t136109033.Text) = 0 Then
    MsgBox("kode barang belum terisi")
    Exit Sub
    End If

    If t236109033.Text.Length = 0 Then
    MsgBox("nama barang belum terisi")
    Exit Sub
    End If

    If Val(t336109033.Text) = 0 Then
    MsgBox("harga jual belum diisi")
    Exit Sub
    End If

    If Val(t436109033.Text) = 0 Then
    MsgBox("jumlah barang belum diisi")
    Exit Sub
    End If

    cari.AturPencarianDataBase("BARANG", "KODEBARANG", kb36109033.Text, 1, CONECT)

    If cari.JumlanBaris = False Then
    MsgBox("kode tidak ada")
    Exit Sub
    End If

    Dim com As New OleDb.OleDbCommand
    com = New OleDb.OleDbCommand("UPDATE BARANG SET kodebarang = '" & t136109033.Text & "', namabarang = '" & t236109033.Text & "', hargajual = " & Val(t336109033.Text) & ", jumlahbarang = " & Val(t436109033.Text) & " where kodebarang ='" & kb36109033.Text & "'", CONECT)

    CONECT.Open()
    com.ExecuteNonQuery()
    CONECT.Close()
    com.Dispose()

    kb36109033.Text = ""
    t136109033.Text = ""
    t236109033.Text = ""
    t336109033.Text = ""
    t436109033.Text = ""

    End Sub

    End Class

    BalasHapus
  4. Public Class LATIHAN_029_36109056
    Dim biya As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\databarang.accdb;Jet OLEDB:Database Password=2422")
    Dim cari As New ByIskandar.CariKeDataBaseByIskandar
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    If Val(t1_36109056.Text) = 0 Then
    MsgBox("kode barang belum terisi")
    Exit Sub
    End If

    If t2_36109056.Text.Length = 0 Then
    MsgBox("nama barang belum terisi")
    Exit Sub
    End If

    If Val(t3_36109056.Text) = 0 Then
    MsgBox("harga jual belum diisi")
    Exit Sub
    End If

    If Val(t4_36109056.Text) = 0 Then
    MsgBox("jumlah barang belum diisi")
    Exit Sub
    End If


    cari.AturPencarianDataBase("BARANG", "KODEBARANG", kb_36109056.Text, 1, biya)

    If cari.JumlanBaris = False Then
    MsgBox("kode tidak ada")
    Exit Sub
    End If

    Dim com As New OleDb.OleDbCommand
    com = New OleDb.OleDbCommand("UPDATE BARANG SET kodebarang = '" & t1_36109056.Text & "', namabarang = '" & t2_36109056.Text & "', hargajual = " & Val(t3_36109056.Text) & ", jumlahbarang = " & Val(t4_36109056.Text) & " where kodebarang ='" & kb_36109056.Text & "'", biya)

    biya.Open()
    com.ExecuteNonQuery()
    biya.Close()
    com.Dispose()

    kb_36109056.Text = ""
    t1_36109056.Text = ""
    t2_36109056.Text = ""
    t3_36109056.Text = ""
    t4_36109056.Text = ""

    End Sub
    End Class

    BalasHapus
  5. Public Class Form2936109040
    Dim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\DATABARANG.accdb;Jet OLEDB:Database Password=150991")

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    If kb36109040.Text.Length = 0 Then
    MsgBox("kode barang belum terisi")
    Exit Sub
    End If

    If t136109040.Text.Length = 0 Then
    MsgBox("kode barang belum terisi")
    Exit Sub
    End If

    If t236109040.Text.Length = 0 Then
    MsgBox("nama barang belum terisi")
    Exit Sub
    End If

    If Val(t336109040.Text) = 0 Then
    MsgBox("harga barang belum terisi")
    Exit Sub
    End If

    If Val(t436109040.Text) = 0 Then
    MsgBox("jumlah barang belum terisi")
    Exit Sub
    End If
    Dim PENCARI As New ByIskandar.CariKeDataBaseByIskandar
    PENCARI.AturPencarianDataBase("BARANG", "KODEBARANG", t136109040.Text, 1, conect)

    If PENCARI.JumlanBaris > 0 Then
    MsgBox("kode sudah ada")

    kb36109040.Text = ""
    t136109040.Text = ""
    t236109040.Text = ""
    t336109040.Text = ""
    t436109040.Text = ""
    Exit Sub
    End If

    Dim Cm As New OleDb.OleDbCommand
    Cm = New OleDb.OleDbCommand("Update BARANG set KODEBARANG ='" & t136109040.Text & "', NAMABARANG = '" & t236109040.Text & "', HARGAJUAL=" & Val(t336109040.Text) & ", JUMLAHBARANG=" & Val(t436109040.Text) & " where KODEBARANG='" & kb36109040.Text & "'", conect)
    conect.Open()
    Cm.ExecuteNonQuery()
    conect.Close()
    Cm.Dispose()

    kb36109040.Text = ""
    t136109040.Text = ""
    t236109040.Text = ""
    t336109040.Text = ""
    t436109040.Text = ""
    End Sub
    End Class

    BalasHapus
  6. Public Class LATIHAN02936109032

    Dim sambung As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;Jet OLEDB:Database Password=jayapura")
    Dim misal As New ByIskandar.CariKeDataBaseByIskandar

    Private Sub Button136109032_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button136109032.Click

    If Val(T136109032.Text) = 0 Then
    MsgBox("kode barang belum terisi")
    Exit Sub
    End If

    If T236109032.Text.Length = 0 Then
    MsgBox("nama barang belum terisi")
    Exit Sub
    End If

    If Val(T336109032.Text) = 0 Then
    MsgBox("harga jual belum diisi")
    Exit Sub
    End If

    If Val(T436109032.Text) = 0 Then
    MsgBox("jumlah barang belum diisi")
    Exit Sub
    End If


    misal.AturPencarianDataBase("BARANG", "KODEBARANG", KB36109032.Text, 1, sambung)

    If misal.JumlanBaris = False Then
    MsgBox("kode tidak ada")
    Exit Sub
    End If

    Dim com As New OleDb.OleDbCommand
    com = New OleDb.OleDbCommand("UPDATE BARANG SET kodebarang = '" & T136109032.Text & "', namabarang = '" & T236109032.Text & "', hargajual = " & Val(T336109032.Text) & ", jumlahbarang = " & Val(T436109032.Text) & " where kodebarang ='" & KB36109032.Text & "'", sambung)

    sambung.Open()
    com.ExecuteNonQuery()
    sambung.Close()
    com.Dispose()

    KB36109032.Text = ""
    T136109032.Text = ""
    T236109032.Text = ""
    T336109032.Text = ""
    T436109032.Text = ""

    End Sub

    End Class

    BalasHapus
  7. Public Class Latih29_36109034
    Dim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;jet OLEDB:database password=nhunoe")
    Dim cari As New ByIskandar.CariKeDataBaseByIskandar
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    If Val(t1.Text) = 0 Then
    MsgBox("kode barang belum terisi")
    Exit Sub
    End If
    If t2.Text.Length = 0 Then
    MsgBox("nama barang belum terisi")
    Exit Sub
    End If
    If Val(t3.Text) = 0 Then
    MsgBox("harga jual belum diisi")
    Exit Sub
    End If
    If Val(t4.Text) = 0 Then
    MsgBox("jumlah barang belum diisi")
    Exit Sub
    End If
    cari.AturPencarianDataBase("BARANG", "KODEBARANG", kb.Text, 1, conect)
    If cari.JumlanBaris = False Then
    MsgBox("kode tidak ada")
    Exit Sub
    End If
    Dim com As New OleDb.OleDbCommand
    com = New OleDb.OleDbCommand("UPDATE BARANG SET kodebarang = '" & t1.Text & "', namabarang = '" & t2.Text & "', hargajual = " & Val(t3.Text) & ", jumlahbarang = " & Val(t4.Text) & " where kodebarang ='" & kb.Text & "'", conect)
    conect.Open()
    com.ExecuteNonQuery()
    conect.Close()
    com.Dispose()
    kb.Text = ""
    t1.Text = ""
    t2.Text = ""
    t3.Text = ""
    t4.Text = ""
    End Sub
    End Class

    BalasHapus
  8. Public Class LATIHAN02936109038
    Dim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\DATABARANG.accdb;Jet OLEDB:Database Password=icha")
    Dim cari As New ByIskandar.CariKeDataBaseByIskandar


    Private Sub Button136109038_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button136109038.Click
    If Val(t136109038.Text) = 0 Then
    MsgBox("kode barang belum terisi")
    Exit Sub
    End If

    If t236109038.Text.Length = 0 Then
    MsgBox("nama barang belum terisi")
    Exit Sub
    End If

    If Val(t336109038.Text) = 0 Then
    MsgBox("harga jual belum diisi")
    Exit Sub
    End If

    If Val(t436109038.Text) = 0 Then
    MsgBox("jumlah barang belum diisi")
    Exit Sub
    End If

    If kb36109038.Text <> t136109038.Text Then
    cari.AturPencarianDataBase("barang", "kodebarang", t136109038.Text, 1, conect)

    If cari.JumlanBaris > 0 Then
    MsgBox("kode sudah ada")
    Exit Sub
    End If
    End If

    Dim com As New OleDb.OleDbCommand
    com = New OleDb.OleDbCommand("update BARANG SET KODEBARANG ='" & t136109038.Text & "', NAMABARANG='" & t236109038.Text & "',HARGAJUAL=" & Val(t336109038.Text) & ", JUMLAHBARANG=" & Val(t436109038.Text) & " where KODEBARANG='" & kb36109038.Text & "'", conect)

    conect.Open()
    com.ExecuteNonQuery()
    conect.Close()
    com.Dispose()

    kb36109038.Text = ""
    t136109038.Text = ""
    t236109038.Text = ""
    t336109038.Text = ""
    t436109038.Text = ""
    End Sub
    End Class

    BalasHapus
  9. Public Class Lat2936109042
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button136109042.Click
    Dim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb")
    Dim cari As New ByIskandar.CariKeDataBaseByIskandar

    If Val(KB236109042.Text) = 0 Then
    MsgBox("kode barang belum terisi")
    Exit Sub
    End If

    If NB36109042.Text.Length = 0 Then
    MsgBox("nama barang belum terisi")
    Exit Sub
    End If

    If Val(HJ36109042.Text) = 0 Then
    MsgBox("harga jual belum diisi")
    Exit Sub
    End If

    If Val(JB36109042.Text) = 0 Then
    MsgBox("jumlah barang belum diisi")
    Exit Sub
    End If


    cari.AturPencarianDataBase("BARANG", "KODEBARANG", KB136109042.Text, 1, conect)

    If cari.JumlanBaris = False Then
    MsgBox("kode tidak ada")
    Exit Sub
    End If

    Dim com As New OleDb.OleDbCommand
    com = New OleDb.OleDbCommand("UPDATE BARANG SET kodebarang = '" & KB236109042.Text & "', namabarang = '" & NB36109042.Text & "', hargajual = " & Val(HJ36109042.Text) & ", jumlahbarang = " & Val(JB36109042.Text) & " where kodebarang ='" & KB136109042.Text & "'", conect)

    conect.Open()
    com.ExecuteNonQuery()
    conect.Close()
    com.Dispose()

    KB136109042.Text = ""
    KB236109042.Text = ""
    NB36109042.Text = ""
    HJ36109042.Text = ""
    JB36109042.Text = ""

    End Sub
    End Class

    BalasHapus
  10. Komentar ini telah dihapus oleh pengarang.

    BalasHapus
  11. Public Class LATIHAN2936109044
    Dim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;Jet OLEDB:Database Password=magfirah")
    Dim firah As New ByIskandar.CariKeDataBaseByIskandar


    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    If Val(t136109044.Text) = 0 Then
    MsgBox("kode barang belum terisi")
    Exit Sub
    End If

    If t236109044.Text.Length = 0 Then
    MsgBox("nama barang belum terisi")
    Exit Sub
    End If

    If Val(t336109044.Text) = 0 Then
    MsgBox("harga jual belum diisi")
    Exit Sub
    End If

    If Val(t436109044.Text) = 0 Then
    MsgBox("jumlah barang belum diisi")
    Exit Sub
    End If


    firah.AturPencarianDataBase("BARANG", "KODEBARANG", kb36109044.Text, 1, conect)

    If firah.JumlanBaris = False Then
    MsgBox("kode tidak ada")
    Exit Sub
    End If

    Dim com As New OleDb.OleDbCommand
    com = New OleDb.OleDbCommand("UPDATE BARANG SET kodebarang = '" & t136109044.Text & "', namabarang = '" & t236109044.Text & "', hargajual = " & Val(t336109044.Text) & ", jumlahbarang = " & Val(t436109044.Text) & " where kodebarang ='" & kb36109044.Text & "'", conect)

    conect.Open()
    com.ExecuteNonQuery()
    conect.Close()
    com.Dispose()

    kb36109044.Text = ""
    t136109044.Text = ""
    t236109044.Text = ""
    t336109044.Text = ""
    t436109044.Text = ""

    End Sub
    End Class

    BalasHapus
  12. revisi
    Public Class LATIHAN029012
    Dim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;jet OLEDB:database password=280765")
    Dim cari As New ByIskandar.CariKeDataBaseByIskandar
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

    If Val(t1.Text) = 0 Then
    MsgBox("kode barang belum terisi")
    Exit Sub
    End If

    If t2.Text.Length = 0 Then
    MsgBox("nama barang belum terisi")
    Exit Sub
    End If

    If Val(t3.Text) = 0 Then
    MsgBox("harga jual belum diisi")
    Exit Sub
    End If

    If Val(t4.Text) = 0 Then
    MsgBox("jumlah barang belum diisi")
    Exit Sub
    End If


    cari.AturPencarianDataBase("BARANG", "KODEBARANG", kb.Text, 1, conect)

    If cari.JumlanBaris = False Then
    MsgBox("kode tidak ada")
    Exit Sub
    End If

    Dim com As New OleDb.OleDbCommand
    com = New OleDb.OleDbCommand("UPDATE BARANG SET kodebarang = '" & t1.Text & "', namabarang = '" & t2.Text & "', hargajual = " & Val(t3.Text) & ", jumlahbarang = " & Val(t4.Text) & " where kodebarang ='" & kb.Text & "'", conect)

    conect.Open()
    com.ExecuteNonQuery()
    conect.Close()
    com.Dispose()

    kb.Text = ""
    t1.Text = ""
    t2.Text = ""
    t3.Text = ""
    t4.Text = ""

    End Sub
    End Class

    BalasHapus
  13. Public Class Latihan29036109046
    Dim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\DATABARANG.accdb;Jet OLEDB:Database Password=14322836")

    Private Sub Button136109046_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button136109046.Click
    If kb36109046.Text.Length = 0 Then
    MsgBox("kode barang belum terisi")
    Exit Sub
    End If

    If t136109046.Text.Length = 0 Then
    MsgBox("kode barang belum terisi")
    Exit Sub
    End If

    If t236109046.Text.Length = 0 Then
    MsgBox("nama barang belum terisi")
    Exit Sub
    End If

    If Val(t336109046.Text) = 0 Then
    MsgBox("harga barang belum terisi")
    Exit Sub
    End If

    If Val(t436109046.Text) = 0 Then
    MsgBox("jumlah barang belum terisi")
    Exit Sub
    End If
    Dim PENCARI As New ByIskandar.CariKeDataBaseByIskandar
    PENCARI.AturPencarianDataBase("BARANG", "KODEBARANG", t136109046.Text, 1, conect)

    If PENCARI.JumlanBaris > 0 Then
    MsgBox("kode sudah ada")

    kb36109046.Text = ""
    t136109046.Text = ""
    t236109046.Text = ""
    t336109046.Text = ""
    t436109046.Text = ""
    Exit Sub
    End If

    Dim Cm As New OleDb.OleDbCommand
    Cm = New OleDb.OleDbCommand("Update BARANG set KODEBARANG ='" & t136109046.Text & "', NAMABARANG = '" & t236109046.Text & "', HARGAJUAL=" & Val(t336109046.Text) & ", JUMLAHBARANG=" & Val(t436109046.Text) & " where KODEBARANG='" & kb36109046.Text & "'", conect)
    conect.Open()
    Cm.ExecuteNonQuery()
    conect.Close()
    Cm.Dispose()

    kb36109046.Text = ""
    t136109046.Text = ""
    t236109046.Text = ""
    t336109046.Text = ""
    t436109046.Text = ""
    End Sub
    End Class

    BalasHapus
  14. Public Class LATIHAN_2936109055
    Dim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\DATABARANG.accdb;Jet OLEDB:Database Password=25")



    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    If kb36109055.Text.Length = 0 Then
    MsgBox("kode barang belum terisi")
    Exit Sub
    End If

    If t136109055.Text.Length = 0 Then
    MsgBox("kode barang belum terisi")
    Exit Sub
    End If

    If t236109055.Text.Length = 0 Then
    MsgBox("nama barang belum terisi")
    Exit Sub
    End If

    If Val(t336109055.Text) = 0 Then
    MsgBox("harga barang belum terisi")
    Exit Sub
    End If

    If Val(t436109055.Text) = 0 Then
    MsgBox("jumlah barang belum terisi")
    Exit Sub
    End If
    Dim PENCARI As New ByIskandar.CariKeDataBaseByIskandar
    PENCARI.AturPencarianDataBase("BARANG", "KODEBARANG", t136109055.Text, 1, conect)

    If PENCARI.JumlanBaris > 0 Then
    MsgBox("kode sudah ada")

    kb36109055.Text = ""
    t136109055.Text = ""
    t236109055.Text = ""
    t336109055.Text = ""
    t436109055.Text = ""
    Exit Sub
    End If

    Dim Cm As New OleDb.OleDbCommand
    Cm = New OleDb.OleDbCommand("Update BARANG set KODEBARANG ='" & t136109055.Text & "', NAMABARANG = '" & t236109055.Text & "', HARGAJUAL=" & Val(t336109055.Text) & ", JUMLAHBARANG=" & Val(t436109055.Text) & " where KODEBARANG='" & kb36109055.Text & "'", conect)
    conect.Open()
    Cm.ExecuteNonQuery()
    conect.Close()
    Cm.Dispose()

    kb36109055.Text = ""
    t136109055.Text = ""
    t236109055.Text = ""
    t336109055.Text = ""
    t436109055.Text = ""
    End Sub
    End Class

    BalasHapus
  15. Public Class LATIHAN02936109030
    Dim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;jet OLEDB:database password=SANIE")
    Dim cari As New ByIskandar.CariKeDataBaseByIskandar
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

    If Val(t1.Text) = 0 Then
    MsgBox("kode barang belum terisi")
    Exit Sub
    End If

    If t2.Text.Length = 0 Then
    MsgBox("nama barang belum terisi")
    Exit Sub
    End If

    If Val(t3.Text) = 0 Then
    MsgBox("harga jual belum diisi")
    Exit Sub
    End If

    If Val(t4.Text) = 0 Then
    MsgBox("jumlah barang belum diisi")
    Exit Sub
    End If


    cari.AturPencarianDataBase("BARANG", "KODEBARANG", kb.Text, 1, conect)

    If cari.JumlanBaris = False Then
    MsgBox("kode tidak ada")
    Exit Sub
    End If

    Dim com As New OleDb.OleDbCommand
    com = New OleDb.OleDbCommand("UPDATE BARANG SET kodebarang = '" & t1.Text & "', namabarang = '" & t2.Text & "', hargajual = " & Val(t3.Text) & ", jumlahbarang = " & Val(t4.Text) & " where kodebarang ='" & kb.Text & "'", conect)

    conect.Open()
    com.ExecuteNonQuery()
    conect.Close()
    com.Dispose()

    kb.Text = ""
    t1.Text = ""
    t2.Text = ""
    t3.Text = ""
    t4.Text = ""

    End Sub
    End Class

    BalasHapus
  16. http://hilariusmariotonapa.blogspot.com/2012/10/prosedur-penyelesaian-latihan2936110048.html

    http://hilariusmariotonapa.blogspot.com/2012/10/deskripsi-latihan2936110048.html

    BalasHapus
  17. http://www.masnurselayar.blogspot.com/2012/10/latihan-2936110055.html

    BalasHapus
  18. http://nurrahmahrasyid2.blogspot.com/2012/10/latihan2936110042.html

    BalasHapus
  19. http://nurhanalott.blogspot.com/2012/10/latihan2936110029.html

    BalasHapus
  20. http://ias-anakbola.blogspot.com/2012/10/latihan29a36110056.html

    BalasHapus
  21. http://ilhaazzahra.blogspot.com/2012/10/latihan2936110033.html

    BalasHapus
  22. http://andiniwarakusuma.blogspot.com/2012/10/latihan2936110034.html

    BalasHapus
  23. http://rizka-azisah.blogspot.com/2012/10/deskripsi-penyelesaian-latihan2936110041.html

    BalasHapus
  24. http://rahmisuryatama05.blogspot.com/2012/10/latihan2936110040.html

    BalasHapus
  25. audryasharii.blogspot.com/2012/10/latihan2936110031.html

    BalasHapus
  26. http://benhilll.blogspot.com/2012/10/deskripsi-dan-prosedur-latihan2936110039.html

    BalasHapus
  27. http://rosyanausman.blogspot.com/2012/10/latihan2936110036.html

    BalasHapus
  28. http://rainaagrippinaa.blogspot.com/2012/10/latihan2936110032.html

    BalasHapus
  29. http://sriayu-36110030.blogspot.com/2012/10/diskripsi-prosedur-latihan-29.html

    BalasHapus
  30. http://dewiwahyuni91.blogspot.com/2012/10/latihan2936110038.html

    BalasHapus
  31. http://tiya-sri.blogspot.com/2012/10/latihan2936110044-aplikasi-komputer-4.html

    BalasHapus
  32. http://reskypurwono.blogspot.com/2012/10/prosedur-penyelesaian-latihan2936110037.html

    BalasHapus
  33. http://03melisa.blogspot.com/2012/10/latihan-29-36110051-apkom-4-d3b.html

    BalasHapus
  34. http://burhankhang58.blogspot.com/2012/10/latihan2936110047.html

    BalasHapus
  35. http://eminaomi.blogspot.com/2012/10/latihan2936110049.html

    BalasHapus
  36. http://hasfiahzain.blogspot.com/2012/10/latihan2936110052.html

    BalasHapus
  37. http://zulkiflitryputra.blogspot.com/2012/10/latihan2936110046.html

    BalasHapus
  38. http://sukadriady.blogspot.com/2012/10/latihan2936110043.html

    BalasHapus
  39. http://ruslancullank1.blogspot.com/2012/10/deskripsilatihan2936110054.html

    BalasHapus