Public Class LATIHAN027_46109010 Dim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;jet oledb:database password=46")
Private Sub s46109010_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles s46109010.Click If Val(kb46109010.Text) = 0 Then MsgBox("kode barang belum terisi") Exit Sub End If
If nb46109010.Text.Length = 0 Then MsgBox("nama barang belum terisi") Exit Sub End If
If Val(hj46109010.Text) = 0 Then MsgBox("harga jual belum diisi") Exit Sub End If
If Val(jb46109010.Text) = 0 Then MsgBox("jumlah barang belum diisi") Exit Sub End If Dim com As New OleDb.OleDbCommand com = New OleDb.OleDbCommand("insert into BARANG (kodebarang, namabarang, hargajual, jumlahbarang) values ('" & kb46109010.Text & "','" & nb46109010.Text & "'," & Val(hj46109010.Text) & "," & Val(jb46109010.Text) & ")", conect)
Dim SRY As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\DATABARANG.accdb;jet oledb:database password =10")
Private Sub TOMBOL46109006_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TOMBOL46109006.Click If Val(KB.Text) = 0 Then MsgBox("Kode Barang belum terisi") Exit Sub End If
If NB.Text.Length = 0 Then MsgBox("Nama Barang belum terisi") Exit Sub End If
If Val(HJ.Text) = 0 Then MsgBox("Harga Hual belum diisi") Exit Sub End If
If Val(JB.Text) = 0 Then MsgBox("Jumlah Jarang belum diisi") Exit Sub End If
Dim QI As New OleDb.OleDbCommand QI = New OleDb.OleDbCommand("insert into BARANG (kodebarang, namabarang, hargajual, jumlahbarang) values ('" & KB.Text & "','" & NB.Text & "'," & Val(HJ.Text) & "," & Val(JB.Text) & ")", SRY)
Dim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;Jet OLEDB:database password=979264")
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If Val(t146109047.Text) = 0 Then MsgBox("kode barang belum terisi") Exit Sub End If
If t246109047.Text.Length = 0 Then MsgBox("nama barang belum terisi") Exit Sub End If
If Val(t346109047.Text) = 0 Then MsgBox("harga jual belum diisi") Exit Sub End If
If Val(t446109047.Text) = 0 Then MsgBox("jumlah barang belum diisi") Exit Sub End If
Dim com As New OleDb.OleDbCommand com = New OleDb.OleDbCommand("insert into BARANG (kodebarang, namabarang, hargajual, jumlahbarang) values ('" & t146109047.Text & "','" & t246109047.Text & "'," & Val(t346109047.Text) & "," & Val(t446109047.Text) & ")", conect)
Public Class LATIHAN2746109026 Dim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;Jet OLEDB:Database Password=26")
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If Val(kb46109026.Text) = 0 Then MsgBox("kode barang belum terisi") Exit Sub End If
If nb46109026.Text.Length = 0 Then MsgBox("nama barang belum terisi") Exit Sub End If
If Val(hj46109026.Text) = 0 Then MsgBox("harga jual belum diisi") Exit Sub End If
If Val(jb46109026 .Text) = 0 Then MsgBox("jumlah barang belum diisi") Exit Sub End If
Dim com As New OleDb.OleDbCommand com = New OleDb.OleDbCommand("insert into BARANG (kodebarang, namabarang, hargajual, jumlahbarang) values ('" & kb46109026.Text & "','" & nb46109026.Text & "'," & Val(hj46109026.Text) & "," & Val(jb46109026.Text) & ")", conect)
FARADILLAH AMALIA RIVAI
BalasHapusLATIHAN 27
Public Class LATIHAN027_46109010
Dim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;jet oledb:database password=46")
Private Sub s46109010_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles s46109010.Click
If Val(kb46109010.Text) = 0 Then
MsgBox("kode barang belum terisi")
Exit Sub
End If
If nb46109010.Text.Length = 0 Then
MsgBox("nama barang belum terisi")
Exit Sub
End If
If Val(hj46109010.Text) = 0 Then
MsgBox("harga jual belum diisi")
Exit Sub
End If
If Val(jb46109010.Text) = 0 Then
MsgBox("jumlah barang belum diisi")
Exit Sub
End If
Dim com As New OleDb.OleDbCommand
com = New OleDb.OleDbCommand("insert into BARANG (kodebarang, namabarang, hargajual, jumlahbarang) values ('" & kb46109010.Text & "','" & nb46109010.Text & "'," & Val(hj46109010.Text) & "," & Val(jb46109010.Text) & ")", conect)
conect.Open()
com.ExecuteNonQuery()
conect.Close()
com.Dispose()
kb46109010.Text = ""
nb46109010.Text = ""
hj46109010.Text = ""
jb46109010.Text = ""
End Sub
End Class
Public Class TUGAS27
BalasHapusDim SRY As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\DATABARANG.accdb;jet oledb:database password =10")
Private Sub TOMBOL46109006_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TOMBOL46109006.Click
If Val(KB.Text) = 0 Then
MsgBox("Kode Barang belum terisi")
Exit Sub
End If
If NB.Text.Length = 0 Then
MsgBox("Nama Barang belum terisi")
Exit Sub
End If
If Val(HJ.Text) = 0 Then
MsgBox("Harga Hual belum diisi")
Exit Sub
End If
If Val(JB.Text) = 0 Then
MsgBox("Jumlah Jarang belum diisi")
Exit Sub
End If
Dim QI As New OleDb.OleDbCommand
QI = New OleDb.OleDbCommand("insert into BARANG (kodebarang, namabarang, hargajual, jumlahbarang) values ('" & KB.Text & "','" & NB.Text & "'," & Val(HJ.Text) & "," & Val(JB.Text) & ")", SRY)
SRY.Open()
QI.ExecuteNonQuery()
SRY.Close()
QI.Dispose()
KB.Text = ""
NB.Text = ""
HJ.Text = ""
JB.Text = ""
End Sub
End Class
Komentar ini telah dihapus oleh pengarang.
BalasHapusPublic Class Latihan2746109047
BalasHapusDim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;Jet OLEDB:database password=979264")
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If Val(t146109047.Text) = 0 Then
MsgBox("kode barang belum terisi")
Exit Sub
End If
If t246109047.Text.Length = 0 Then
MsgBox("nama barang belum terisi")
Exit Sub
End If
If Val(t346109047.Text) = 0 Then
MsgBox("harga jual belum diisi")
Exit Sub
End If
If Val(t446109047.Text) = 0 Then
MsgBox("jumlah barang belum diisi")
Exit Sub
End If
Dim com As New OleDb.OleDbCommand
com = New OleDb.OleDbCommand("insert into BARANG (kodebarang, namabarang, hargajual, jumlahbarang) values ('" & t146109047.Text & "','" & t246109047.Text & "'," & Val(t346109047.Text) & "," & Val(t446109047.Text) & ")", conect)
conect.Open()
com.ExecuteNonQuery()
conect.Close()
com.Dispose()
t146109047.Text = ""
t246109047.Text = ""
t346109047.Text = ""
t446109047.Text = ""
End Sub
End Class
Public Class LATIHAN2746109026
BalasHapusDim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\databarang.accdb;Jet OLEDB:Database Password=26")
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If Val(kb46109026.Text) = 0 Then
MsgBox("kode barang belum terisi")
Exit Sub
End If
If nb46109026.Text.Length = 0 Then
MsgBox("nama barang belum terisi")
Exit Sub
End If
If Val(hj46109026.Text) = 0 Then
MsgBox("harga jual belum diisi")
Exit Sub
End If
If Val(jb46109026 .Text) = 0 Then
MsgBox("jumlah barang belum diisi")
Exit Sub
End If
Dim com As New OleDb.OleDbCommand
com = New OleDb.OleDbCommand("insert into BARANG (kodebarang, namabarang, hargajual, jumlahbarang) values ('" & kb46109026.Text & "','" & nb46109026.Text & "'," & Val(hj46109026.Text) & "," & Val(jb46109026.Text) & ")", conect)
conect.Open()
com.ExecuteNonQuery()
conect.Close()
com.Dispose()
kb46109026.Text = ""
nb46109026.Text = ""
hj46109026.Text = ""
jb46109026.Text = ""
End Sub
Private Sub LATIHAN2746109026_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class
http://kumpulanlatihan46109060.blogspot.com/2011/11/latihan-27.html
BalasHapushttp://taufiqgooners.blogspot.com/2011/11/latihan-27-apkom.html
BalasHapushttp://irvanbravely.blogspot.com/2011/11/latihan-27-apkom.html
BalasHapus