Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim faradillah As New DataTable
Private Sub Latihan15_46109010Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim fara As New OleDb.OleDbDataAdapter fara = New OleDb.OleDbDataAdapter("select * from barang", CONECT) faradillah.Rows.Clear() fara.Fill(faradillah) data46109010.DataSource = faradillah fara.Dispose()
End Sub End Class
TUGAS 16
Public Class latihan16_46109010 Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim Faradillah As New DataTable
Private Sub latihan16_46109010Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim fara As New OleDb.OleDbDataAdapter fara = New OleDb.OleDbDataAdapter("select * from mastertransaksi", CONECT) Faradillah.Rows.Clear() fara.Fill(Faradillah) data46109010.DataSource = Faradillah fara.Dispose() End Sub
End Class
TUGAS 17
Public Class latihan17_46109010 Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim Faradillah As New DataTable
Private Sub latihan17_46109010Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim fara As New OleDb.OleDbDataAdapter fara = New OleDb.OleDbDataAdapter("select * from mastertransaksi", CONECT) Faradillah.Rows.Clear() fara.Fill(Faradillah) data46109010.DataSource = Faradillah fara.Dispose() End Sub
Public Class latihan18_46109010 Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim faradillah As New DataTable
Private Sub latihan18_46109010Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim fara As New OleDb.OleDbDataAdapter fara = New OleDb.OleDbDataAdapter("select barang.kodebarang, barang.namabarang, detailtransaksi.notrans, detailtransaksi.unit, detailtransaksi.harga from barang inner join detailtransaksi on barang.kodebarang=detailtransaksi.kodebarang", CONECT) faradillah.Rows.Clear() fara.Fill(faradillah) data46109010.DataSource = faradillah fara.Dispose()
End Sub End Class
TUGAS 19
Public Class latihan19_46109010
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim Faradillah As New DataTable
Private Sub latihan19_46109010Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim fara As New OleDb.OleDbDataAdapter fara = New OleDb.OleDbDataAdapter("select mastertransaksi.notrans, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.kodebarang, detailtransaksi.unit, detailtransaksi.harga from mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans", CONECT) Faradillah.Rows.Clear() fara.Fill(Faradillah) data46109010.DataSource = Faradillah fara.Dispose() End Sub End Class
TUGAS 20
Public Class latihan20_46109010 Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim Faradillah As New DataTable
Private Sub latihan20_46109010Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim Fara As New OleDb.OleDbDataAdapter Fara = New OleDb.OleDbDataAdapter("select barang.kodebarang, barang.namabarang, mastertransaksi.notrans, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.unit, detailtransaksi.harga from (mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans) inner join barang on detailtransaksi.kodebarang=barang.kodebarang", CONECT) Faradillah.Rows.Clear() Fara.Fill(Faradillah) data46109010.DataSource = Faradillah Fara.Dispose() End Sub End Class
Public Class latihan21_46109010 Dim hubung As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source =" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Dim Faradillah1 As New DataTable Dim Faradillah2 As New DataTable
Dim VR As New DataSet
Dim fara1 As New BindingSource Dim fara2 As New BindingSource
Private Sub latihan21_46109010Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim alfa1 As New OleDb.OleDbDataAdapter Dim alfa2 As New OleDb.OleDbDataAdapter
alfa1 = New OleDb.OleDbDataAdapter("select * from mastertransaksi", hubung) alfa1.Fill(Faradillah1) alfa1.Dispose()
alfa2 = New OleDb.OleDbDataAdapter("select * from detailtransaksi", hubung) alfa2.Fill(Faradillah2) alfa2.Dispose()
data146109010.DataSource = fara1 data246109010.DataSource = fara2 End Sub
End Class
TUGAS 22
Public Class latihan22_46109010 Dim hubung As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source =" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Dim Faradillah1 As New DataTable Dim faradillah2 As New DataTable
Dim VR As New DataSet
Dim fara1 As New BindingSource Dim fara2 As New BindingSource
Private Sub latihan22_46109010Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim alfa1 As New OleDb.OleDbDataAdapter Dim alfa2 As New OleDb.OleDbDataAdapter
alfa1 = New OleDb.OleDbDataAdapter("select * from mastertransaksi", hubung) alfa1.Fill(Faradillah1) alfa1.Dispose()
alfa2 = New OleDb.OleDbDataAdapter("select * from detailtransaksi", hubung) alfa2.Fill(faradillah2) alfa2.Dispose()
Public Class Latihan_15_46109060 Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim DT As New DataTable Private Sub Latihan15_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim fadli As New OleDb.OleDbDataAdapter fadli = New OleDb.OleDbDataAdapter("select * from barang", CONECT) DT.Rows.Clear() fadli.Fill(DT) Data46109060.DataSource = DT fadli.Dispose() End Sub End Class
Public Class latihan_16_46109060 Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim DT As New DataTable Private Sub latihan_16_46109060_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim fadli As New OleDb.OleDbDataAdapter fadli = New OleDb.OleDbDataAdapter("select * from mastertransaksi", CONECT) DT.Rows.Clear() fadli.Fill(DT) Data46109060.DataSource = DT fadli.Dispose() End Sub End Class
Public Class latihan_17_46109060 Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim DT As New DataTable Private Sub latihan_17_46109060_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim fadli As New OleDb.OleDbDataAdapter fadli = New OleDb.OleDbDataAdapter("select * from mastertransaksi", CONECT) DT.Rows.Clear() fadli.Fill(DT) Data46109060.DataSource = DT fadli.Dispose() End Sub End Class
Public Class latihan_18_46109060 Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim DT As New DataTable Private Sub latihan_18_46109060_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim fadli As New OleDb.OleDbDataAdapter fadli = New OleDb.OleDbDataAdapter("select barang.kodebarang, barang.namabarang, detailtransaksi.dtc, detailtransaksi.unit, detailtransaksi.harga from barang inner join detailtransaksi on barang.kodebarang=detailtransaksi.kodebarang", CONECT) DT.Rows.Clear() fadli.Fill(DT) Data46109060.DataSource = DT fadli.Dispose() End Sub End Class
Public Class latihan_19_46109060 Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim DT As New DataTable Private Sub latihan_19_46109060_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim fadli As New OleDb.OleDbDataAdapter fadli = New OleDb.OleDbDataAdapter("select mastertransaksi.dtc, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.kodebarang, detailtransaksi.unit, detailtransaksi.harga from mastertransaksi inner join detailtransaksi on mastertransaksi.dtc=detailtransaksi.dtc", CONECT) DT.Rows.Clear() fadli.Fill(DT) Data46109060.DataSource = DT fadli.Dispose() End Sub End Class
Public Class latihan_20_46109060 Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim DT As New DataTable Private Sub latihan_20_46109060_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim fadli As New OleDb.OleDbDataAdapter fadli = New OleDb.OleDbDataAdapter("select barang.kodebarang, barang.namabarang, mastertransaksi.dtc, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.unit, detailtransaksi.harga from (mastertransaksi inner join detailtransaksi on mastertransaksi.dtc=detailtransaksi.dtc) inner join barang on detailtransaksi.kodebarang=barang.kodebarang", CONECT) DT.Rows.Clear() fadli.Fill(DT) Data46109060.DataSource = DT fadli.Dispose() End Sub End Class
Dim Jembatan As New OleDb.OleDbConnection(" Provider=Microsoft.ACE.OLEDB.12.0;Data Source= D:\berbagi\sharing2\LATIHAN 15-26 MENGAKSES DATA\DataTransaksiJualBeli.accdb") Dim Bakpenampung As New DataTable
Private Sub latihan1546109044_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim X As New OleDb.OleDbDataAdapter X = New OleDb.OleDbDataAdapter("select* from barang", Jembatan) X.Fill(Bakpenampung) X.Dispose()
DataGridView1.DataSource = Bakpenampung
End Sub End Class
Public Class latihan1646109044 Dim Jembatan As New OleDb.OleDbConnection(" Provider=Microsoft.ACE.OLEDB.12.0;Data Source= D:\berbagi\sharing2\LATIHAN 15-26 MENGAKSES DATA\DataTransaksiJualBeli.accdb") Dim Bakpenampung As New DataTable
Private Sub latihan1646109044_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim X As New OleDb.OleDbDataAdapter X = New OleDb.OleDbDataAdapter("select* FROM MASTERTRANSAKSI", Jembatan) X.Fill(Bakpenampung) X.Dispose()
DGV146109044.DataSource = Bakpenampung End Sub End Class
Public Class latihan1746109044 Dim Jembatan As New OleDb.OleDbConnection(" Provider=Microsoft.ACE.OLEDB.12.0;Data Source= D:\berbagi\sharing2\LATIHAN 15-26 MENGAKSES DATA\DataTransaksiJualBeli.accdb") Dim Bakpenampung As New DataTable
Private Sub latihan1746109044_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim X As New OleDb.OleDbDataAdapter X = New OleDb.OleDbDataAdapter("select* FROM DETAILTRANSAKSI", Jembatan) X.Fill(Bakpenampung) X.Dispose()
DGV46109044.DataSource = Bakpenampung End Sub End Class
Public Class Latihan1546109047 Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim muhitha As New DataTable Private Sub Latihan1546109047_load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim itha As New OleDb.OleDbDataAdapter itha = New OleDb.OleDbDataAdapter("select * from barang", CONECT) muhitha.Rows.Clear() itha.Fill(muhitha) DG46109047.DataSource = muhitha itha.Dispose() End Sub End Class Public Class Latihan1646109047 Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim muhitha As New DataTable Private Sub Latihan1546109047_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim itha As New OleDb.OleDbDataAdapter itha = New OleDb.OleDbDataAdapter("select * from mastertransaksi", CONECT) muhitha.Rows.Clear() itha.Fill(muhitha) DG46109047.DataSource = muhitha itha.Dispose() End Sub End Class Public Class Latihan1746109047 Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim muhitha As New DataTable Private Sub Latihan1746109051_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim itha As New OleDb.OleDbDataAdapter itha = New OleDb.OleDbDataAdapter("select * FROM DETAILTRANSAKSI", CONECT) muhitha.Rows.Clear() itha.Fill(muhitha) DG46109047.DataSource = muhitha itha.Dispose() End Sub End Class
Public Class Latihan1846109047 Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim muhitha As New DataTable Private Sub Latihan1846109047_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim itha As New OleDb.OleDbDataAdapter itha = New OleDb.OleDbDataAdapter("select mastertransaksi.notrans, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.kodebarang, detailtransaksi.unit, detailtransaksi.harga from mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans", CONECT) muhitha.Rows.Clear() itha.Fill(muhitha) DG46109047.DataSource = muhitha itha.Dispose() End Sub End Class Public Class Latihan1946109047 Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim muhitha As New DataTable Private Sub Latihan1946109047_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim itha As New OleDb.OleDbDataAdapter itha = New OleDb.OleDbDataAdapter("select mastertransaksi.notrans, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.kodebarang, detailtransaksi.unit, detailtransaksi.harga from mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans", CONECT) muhitha.Rows.Clear() itha.Fill(muhitha) DG46109047.DataSource = muhitha itha.Dispose() End Sub End Class
Public Class Latihan2046109047 Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim muhitha As New DataTable Private Sub Latihan2046109047_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim itha As New OleDb.OleDbDataAdapter itha = New OleDb.OleDbDataAdapter("select barang.kodebarang, barang.namabarang, mastertransaksi.notrans, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.unit, detailtransaksi.harga from (mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans) inner join barang on detailtransaksi.kodebarang=barang.kodebarang", CONECT) muhitha.Rows.Clear() itha.Fill(muhitha) DG46109047.DataSource = muhitha muhitha.Dispose() End Sub End Class
Public Class Latihan2146109047 Dim koneksi As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source =" & Application.StartupPath & "\DataTransaksiJualBeli.accdb") Dim tabel01 As New DataTable Dim tabel02 As New DataTable Dim ds As New DataSet Dim bs1 As New BindingSource Dim bs2 As New BindingSource
Private Sub Latihan2146109047_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim adapter1 As New OleDb.OleDbDataAdapter Dim adapter2 As New OleDb.OleDbDataAdapter adapter1 = New OleDb.OleDbDataAdapter("select * from mastertransaksi", koneksi) adapter1.Fill(tabel01) adapter1.Dispose() adapter2 = New OleDb.OleDbDataAdapter("select * from detailtransaksi", koneksi) adapter2.Fill(tabel02) adapter2.Dispose() ds.Tables.Add(tabel01) ds.Tables.Add(tabel02) tabel01.TableName = "muhitha" tabel02.TableName = "itha" ds.Relations.Add(New DataRelation("itha", ds.Tables("muhitha").Columns("notrans"), ds.Tables("itha").Columns("notrans"))) bs1.DataSource = ds bs1.DataMember = "muhitha" bs2.DataSource = bs1 bs2.DataMember = "itha" DG146109047.DataSource = bs1 DG246109047.DataSource = bs2 End Sub End Class
Public Class Latihan2246109047 Dim koneksi As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source =" & Application.StartupPath & "\DataTransaksiJualBeli.accdb") Dim tabel01 As New DataTable Dim tabel02 As New DataTable Dim ds As New DataSet Dim bs1 As New BindingSource Dim bs2 As New BindingSource Private Sub latihan2246109047_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim adapter1 As New OleDb.OleDbDataAdapter Dim adapter2 As New OleDb.OleDbDataAdapter adapter1 = New OleDb.OleDbDataAdapter("select * from mastertransaksi", koneksi) adapter1.Fill(tabel01) adapter1.Dispose() adapter2 = New OleDb.OleDbDataAdapter("select * from detailtransaksi", koneksi) adapter2.Fill(tabel02) adapter2.Dispose() ds.Tables.Add(tabel01) ds.Tables.Add(tabel02) tabel01.TableName = "muhitha" tabel02.TableName = "itha" ds.Relations.Add(New DataRelation("itha", ds.Tables("muhitha").Columns("notrans"), ds.Tables("itha").Columns("notrans"))) bs1.DataSource = ds bs1.DataMember = "muhitha" bs2.DataSource = bs1 bs2.DataMember = "itha" DG146109047.DataSource = bs1 DG246109047.DataSource = bs2 End Sub End Class
Dim Penghubung As New OleDb.OleDbConnection(" Provider=microsoft.ace.oledb.12.0;data source= “ & Application.StartupPath & “\datatransaksijualbeli.accdb") Dim Bakpenampung As New DataTable
Private Sub latihan1546109058_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim X As New OleDb.OleDbDataAdapter X = New OleDb.OleDbDataAdapter("select* from barang", Penghubung) X.Fill(Bakpenampung) X.Dispose()
DataGridView1.DataSource = Bakpenampung
End Sub End Class Public Class latihan1646109058 Dim Penghubung As New OleDb.OleDbConnection(" Provider=microsoft.ace.oledb.12.0;data source= “ & Application.StartupPath & “\datatransaksijualbeli.accdb") Dim Bakpenampung As New DataTable
Private Sub latihan1646109058_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim X As New OleDb.OleDbDataAdapter X = New OleDb.OleDbDataAdapter("select* FROM MASTERTRANSAKSI", Penghubung) X.Fill(Bakpenampung) X.Dispose()
DGV146109058.DataSource = Bakpenampung End Sub End Class
Public Class latihan1746109058 Dim Penghubung As New OleDb.OleDbConnection(" Provider=microsoft.ace.oledb.12.0;data source= “ & Application.StartupPath & “\datatransaksijualbeli.accdb") Dim Bakpenampung As New DataTable
Private Sub latihan1746109058_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim X As New OleDb.OleDbDataAdapter X = New OleDb.OleDbDataAdapter("select* FROM DETAILTRANSAKSI", Penghubung) X.Fill(Bakpenampung) X.Dispose()
DGV46109058.DataSource = Bakpenampung End Sub End Class
Public Class latihan1846109058 Dim Penghubung As New OleDb.OleDbConnection(" Provider=microsoft.ace.oledb.12.0;data source= “ & Application.StartupPath & “\datatransaksijualbeli.accdb") Dim Bakpenampung As New DataTable
Private Sub Latihan01836109054_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim X As New OleDb.OleDbDataAdapter X = New OleDb.OleDbDataAdapter("select detailtransaksi.notrans,Detailtransaksi.Unit,detailtransaksi.Harga,barang.namabarang,barang.kodebarang from detailTransaksi Inner Join Barang On Detailtransaksi.kodebarang = barang.kodebarang", Penghubung) X.Fill(Bakpenampung) X.Dispose()
DGV146109058.DataSource = Bakpenampung
End Sub End Class
Public Class latihan1946109058
Dim Penghubung As New OleDb.OleDbConnection(" Provider=microsoft.ace.oledb.12.0;data source= “ & Application.StartupPath & “\datatransaksijualbeli.accdb") Dim Bakpenampung As New DataTable
Private Sub Latihan1946109058_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim X As New OleDb.OleDbDataAdapter X = New OleDb.OleDbDataAdapter("select mastertransaksi.notrans,mastertransaksi.tanggaltransaksi,mastertransaksi.jenistransaksi,detailtransaksi.kodebarang,Detailtransaksi.Unit,detailtransaksi.Harga from masterTransaksi Inner Join Detailtransaksi On mastertransaksi.notrans = Detailtransaksi.notrans", Penghubung) X.Fill(Bakpenampung) X.Dispose()
DGV_46109058.DataSource = Bakpenampung End Sub End Class
Public Class latihan2046109058
Dim Penghubung As New OleDb.OleDbConnection(" Provider=microsoft.ace.oledb.12.0;data source= “ & Application.StartupPath & “\datatransaksijualbeli.accdb") Dim Bakpenampung As New DataTable
Private Sub latihan2046109058_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim X As New OleDb.OleDbDataAdapter X = New OleDb.OleDbDataAdapter("select barang.kodebarang,barang.namabarang,mastertransaksi.notrans,mastertransaksi.tanggaltransaksi,mastertransaksi.jenistransaksi,Detailtransaksi.Unit,detailtransaksi.Harga from (mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans) inner join barang on detailtransaksi.kodebarang=barang.kodebarang", Penghubung) X.Fill(Bakpenampung) X.Dispose()
DGV_46109058.DataSource = Bakpenampung End Sub End Class
Dim Konek As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source =d:\berbagi\sharing2\LATIHAN 15-26 MENGAKSES DATA\DataTransaksiJualBeli.accdb") Dim Bak As New DataTable Dim Mandi As New DataTable Dim dtset As New DataSet Dim bs1 As New BindingSource Dim bs2 As New BindingSource
Private Sub latihan2146109058_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim x As New OleDb.OleDbDataAdapter x = New OleDb.OleDbDataAdapter("select * from mastertransaksi ", Konek) x.Fill(Bak) x.Dispose() Dim y As New OleDb.OleDbDataAdapter y = New OleDb.OleDbDataAdapter("select * from DETAILTRANSAKSI ", Konek) y.Fill(Mandi) y.Dispose() Bak.TableName = "ibu" Mandi.TableName = "anak" dtset.Tables.Add(Bak) dtset.Tables.Add(Mandi) dtset.Relations.Add(New DataRelation("hubung1", dtset.Tables("ibu").Columns("NOTRANS"), dtset.Tables("anak").Columns("NOTRANS"))) bs1.DataSource = dtset bs1.DataMember = "ibu" bs2.DataSource = bs1 bs2.DataMember = "hubung1" DGV1_461090584.DataSource = bs1 DGV2_461090584.DataSource = bs2
End Sub End Class
Public Class latihan2246109058
Dim Konek As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source =d:\berbagi\sharing2\LATIHAN 15-26 MENGAKSES DATA\DataTransaksiJualBeli.accdb") Dim Bak As New DataTable Dim Mandi As New DataTable Dim dtset As New DataSet Dim bs1 As New BindingSource Dim bs2 As New BindingSource
Private Sub latihan2246109058_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim x As New OleDb.OleDbDataAdapter x = New OleDb.OleDbDataAdapter("select * from mastertransaksi ", Konek) x.Fill(Bak) x.Dispose() Dim y As New OleDb.OleDbDataAdapter y = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.NOTRANS,DETAILTRANSAKSI.KODEBARANG,DETAILTRANSAKSI.UNIT,DETAILTRANSAKSI.HARGA,BARANG.NAMABARANG, UNIT * HARGA AS JUMLAHREALISASI, UNIT * HARGAJUAL AS JUMLAHSTANDAR FROM DETAILTRANSAKSI INNER JOIN BARANG ON DETAILTRANSAKSI.KODEBARANG = BARANG.KODEBARANG ", Konek) y.Fill(Mandi) y.Dispose() Bak.TableName = "ibu" Mandi.TableName = "anak" dtset.Tables.Add(Bak) dtset.Tables.Add(Mandi) dtset.Relations.Add(New DataRelation("hubung1", dtset.Tables("ibu").Columns("NOTRANS"), dtset.Tables("anak").Columns("NOTRANS"))) bs1.DataSource = dtset bs1.DataMember = "ibu" bs2.DataSource = bs1 bs2.DataMember = "hubung1" DGV1_46109058.DataSource = bs1 DGV2_46109058.DataSource = bs2
Public Class Latihan15_46109050 Dim ODB As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source =" & Application.StartupPath & "\DataTransaksiJualBeli.accdb") Dim DT As New DataTable Private Sub Latihan15_46109050Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim RISKY As New OleDb.OleDbDataAdapter RISKY = New OleDb.OleDbDataAdapter("select * from barang", ODB) DT.Rows.Clear() RISKY.Fill(DT) DGV_46109050.DataSource = DT RISKY.Dispose() End Sub End Class
Public Class Latihan16_46109050 Dim ODB As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source =" & Application.StartupPath & "\DataTransaksiJualBeli.accdb") Dim DT As New DataTable
Private Sub Latihan16_46109050Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim RISKY As New OleDb.OleDbDataAdapter RISKY = New OleDb.OleDbDataAdapter("select * from mastertransaksi", ODB) RISKY.Fill(DT) RISKY.Dispose() DGV_46109050.DataSource = DT End Sub End Class
Public Class Latihan17_46109050 Dim ODB As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source =" & Application.StartupPath & "\DataTransaksiJualBeli.accdb") Dim DT As New DataTable
Private Sub Latihan17_46109050Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim RISKY As New OleDb.OleDbDataAdapter RISKY = New OleDb.OleDbDataAdapter("select * from detailtransaksi", ODB) RISKY.Fill(DT) RISKY.Dispose() DGV_46109050.DataSource = DT End Sub End Class
Public Class Latihan18_46109050 Dim ODB As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source =" & Application.StartupPath & "\DataTransaksiJualBeli.accdb") Dim DT As New DataTable
Private Sub Latihan18_46109050Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim RISKY As New OleDb.OleDbDataAdapter RISKY = New OleDb.OleDbDataAdapter("SELECT BARANG.KODEBARANG, BARANG.NAMABARANG, DETAILTRANSAKSI.NOTRANS, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA FROM BARANG INNER JOIN DETAILTRANSAKSI ON BARANG.KODEBARANG = DETAILTRANSAKSI.KODEBARANG", ODB) RISKY.Fill(DT) RISKY.Dispose() DGV_46109050.DataSource = DT End Sub End Class
Public Class Latihan19_46109050 Dim ODB As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source =" & Application.StartupPath & "\DataTransaksiJualBeli.accdb") Dim DT As New DataTable
Private Sub Latihan19_46109050Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim RISKY As New OleDb.OleDbDataAdapter RISKY = New OleDb.OleDbDataAdapter("SELECT MASTERTRANSAKSI.NOTRANS, MASTERTRANSAKSI.TANGGALTRANSAKSI, MASTERTRANSAKSI.JENISTRANSAKSI, DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA FROM DETAILTRANSAKSI INNER JOIN MASTERTRANSAKSI ON DETAILTRANSAKSI.NOTRANS = MASTERTRANSAKSI.NOTRANS", ODB) RISKY.Fill(DT) RISKY.Dispose() DGV_46109050.DataSource = DT End Sub End Class
Public Class Latihan20_46109050 Dim ODB As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source =" & Application.StartupPath & "\DataTransaksiJualBeli.accdb") Dim DT As New DataTable
Private Sub Latihan20_46109050Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim RISKY As New OleDb.OleDbDataAdapter RISKY = New OleDb.OleDbDataAdapter("SELECT BARANG.KODEBARANG, BARANG.NAMABARANG, MASTERTRANSAKSI.NOTRANS, MASTERTRANSAKSI.TANGGALTRANSAKSI, MASTERTRANSAKSI.JENISTRANSAKSI, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA FROM (BARANG INNER JOIN DETAILTRANSAKSI ON BARANG.KODEBARANG = DETAILTRANSAKSI.KODEBARANG) INNER JOIN MASTERTRANSAKSI ON DETAILTRANSAKSI.NOTRANS = MASTERTRANSAKSI.NOTRANS", ODB) RISKY.Fill(DT) RISKY.Dispose() DGV_46109050.DataSource = DT End Sub End Class
Public Class Latihan21_46109050 Dim ODB As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source =" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Dim RISKY1 As New DataTable Dim RISKY2 As New DataTable
Dim ds As New DataSet
Dim MAHIRA1 As New BindingSource Dim MAHIRA2 As New BindingSource
Private Sub Latihan21_46109050Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim a As New OleDb.OleDbDataAdapter Dim b As New OleDb.OleDbDataAdapter
a = New OleDb.OleDbDataAdapter("select * from mastertransaksi", ODB) a.Fill(RISKY1) a.Dispose()
b = New OleDb.OleDbDataAdapter("select * from detailtransaksi", ODB) b.Fill(RISKY2) b.Dispose()
QQ1_46109050.DataSource = MAHIRA1 QQ2_46109050.DataSource = MAHIRA2 End Sub End Class
Public Class Latihan22_46109050 Dim ODB As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source =" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Dim RISKY1 As New DataTable Dim RISKY2 As New DataTable
Dim ds As New DataSet
Dim MAHIRA1 As New BindingSource Dim MAHIRA2 As New BindingSource
Private Sub Latihan22_46109050Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim a As New OleDb.OleDbDataAdapter Dim b As New OleDb.OleDbDataAdapter
a = New OleDb.OleDbDataAdapter("select * from mastertransaksi", ODB) a.Fill(RISKY1) a.Dispose()
b = New OleDb.OleDbDataAdapter("SELECT DETAILTRANSAKSI.NOTRANS, DETAILTRANSAKSI.HARGA, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.KODEBARANG, BARANG.NAMABARANG, [DETAILTRANSAKSI]![UNIT]*[BARANG]![HARGAJUAL] AS JUMLAHSTANDAR, [DETAILTRANSAKSI]![UNIT]*[DETAILTRANSAKSI]![HARGA] AS JUMLAHREALISASI FROM BARANG INNER JOIN DETAILTRANSAKSI ON BARANG.KODEBARANG = DETAILTRANSAKSI.KODEBARANG", ODB) b.Fill(RISKY2) b.Dispose()
Public Class latihan1546109026 Dim jalan As New OleDb.OleDbConnection(" Provider=Microsoft.ACE.OLEDB.12.0;Data Source =" & Application.StartupPath & "\DataTransaksiJualBeli.accdb") Dim Bakpenampung As New DataTable
Private Sub latihan1546109026_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim X As New OleDb.OleDbDataAdapter X = New OleDb.OleDbDataAdapter("select* from barang", jalan) X.Fill(Bakpenampung) dtg46109026.DataSource = Bakpenampung X.Dispose() End Sub
Private Sub dtg46109026_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dtg46109026.CellContentClick
End Sub End Class
Public Class latihan1646109026
Dim jalan As New OleDb.OleDbConnection(" Provider=Microsoft.ACE.OLEDB.12.0;Data Source =" & Application.StartupPath & "\DataTransaksiJualBeli.accdb") Dim detailtransaksi As New DataTable
Private Sub latihan1646109026_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim adapter As New OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select* from mastertransaksi", jalan) adapter.Fill(detailtransaksi) dtg46109026.DataSource = detailtransaksi adapter.Dispose() End Sub
Private Sub dtg46109026_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dtg46109026.CellContentClick
End Sub End Class
Public Class latihan1746109026 Dim Jalan As New OleDb.OleDbConnection(" Provider=Microsoft.ACE.OLEDB.12.0;Data Source =" & Application.StartupPath & "\DataTransaksiJualBeli.accdb") Dim mastertransaksi As New DataTable
Private Sub latihan_17_026_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim adapter As New OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select* from detailtransaksi", Jalan) adapter.Fill(mastertransaksi) dtg46109026.DataSource = mastertransaksi adapter.Dispose() End Sub
Private Sub dtg46109026_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dtg46109026.CellContentClick
Public Class latihan1846109026 '.OLEDB.12.0;Data Source="D:\Materi\Poltekx\VB8\Materi Apkom4\2010\DataTransaksiJualBeli.accdb' Dim jalan As New OleDb.OleDbConnection(" Provider=Microsoft.ACE.OLEDB.12.0;Data Source =" & Application.StartupPath & "\DataTransaksiJualBeli.accdb") Dim Bakpenampung As New DataTable
Private Sub latihan1846109026_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim adapter As New OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select barang.kodebarang, barang.namabarang, detailtransaksi.notrans, detailtransaksi.unit, detailtransaksi.harga from barang inner join detailtransaksi on barang.kodebarang=detailtransaksi.kodebarang", jalan) adapter.Fill(Bakpenampung) dtg46109026.DataSource = Bakpenampung adapter.Dispose() End Sub
Private Sub dtg46109026_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dtg46109026.CellContentClick
End Sub End Class
Public Class latihan1946109026 '.OLEDB.12.0;Data Source="D:\Materi\Poltekx\VB8\Materi Apkom4\2010\DataTransaksiJualBeli.accdb' Dim jalan As New OleDb.OleDbConnection(" Provider=Microsoft.ACE.OLEDB.12.0;Data Source =" & Application.StartupPath & "\DataTransaksiJualBeli.accdb") Dim Bakpenampung As New DataTable
Private Sub latihan1946109026_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim adapter As New OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select mastertransaksi.notrans, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.kodebarang, detailtransaksi.unit, detailtransaksi.harga from mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans", jalan) adapter.Fill(Bakpenampung) dtg46109026.DataSource = Bakpenampung adapter.Dispose() End Sub
Private Sub dtg46109026_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dtg46109026.CellContentClick
End Sub End Class
Public Class latihan2046109026 '.OLEDB.12.0;Data Source="D:\Materi\Poltekx\VB8\Materi Apkom4\2010\DataTransaksiJualBeli.accdb' Dim jalan As New OleDb.OleDbConnection(" Provider=Microsoft.ACE.OLEDB.12.0;Data Source =" & Application.StartupPath & "\DataTransaksiJualBeli.accdb") Dim Bakpenampung As New DataTable
Private Sub latihan2046109026_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim adapter As New OleDb.OleDbDataAdapter adapter = New OleDb.OleDbDataAdapter("select barang.kodebarang, barang.namabarang, mastertransaksi.notrans, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.unit, detailtransaksi.harga from (mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans) inner join barang on detailtransaksi.kodebarang=barang.kodebarang", jalan) adapter.Fill(Bakpenampung) dtg46109026.DataSource = Bakpenampung adapter.Dispose() End Sub
Private Sub dtg46109026_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dtg46109026.CellContentClick
Public Class latihan2146109026 Dim hubung As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source =" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Dim ibeng As New DataTable Dim ibeng_2 As New DataTable
Dim DS As New DataSet
Dim ibnu As New BindingSource Dim ibnu_2 As New BindingSource
Private Sub latihan2146109026_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim odba As New OleDb.OleDbDataAdapter Dim odba2 As New OleDb.OleDbDataAdapter
odba = New OleDb.OleDbDataAdapter("select * from mastertransaksi", hubung) odba.Fill(ibeng) odba.Dispose()
odba2 = New OleDb.OleDbDataAdapter("select * from detailtransaksi", hubung) odba2.Fill(ibeng_2) odba2.Dispose()
dtg46109026.DataSource = ibnu dtg146109026.DataSource = ibnu_2 End Sub
Private Sub dtg46109026_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dtg46109026.CellContentClick
End Sub
Private Sub dtg146109026_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dtg146109026.CellContentClick
End Sub End Class
Public Class latihan2246109026 Dim hubung As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source =" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Dim ibeng As New DataTable Dim ibeng_2 As New DataTable
Dim DS As New DataSet
Dim ibnu As New BindingSource Dim ibnu_2 As New BindingSource
Private Sub latihan2246109026_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim odba As New OleDb.OleDbDataAdapter Dim odba2 As New OleDb.OleDbDataAdapter
odba = New OleDb.OleDbDataAdapter("select * from mastertransaksi", hubung) odba.Fill(ibeng) odba.Dispose()
odba2 = New OleDb.OleDbDataAdapter("select * from detailtransaksi", hubung) odba2.Fill(ibeng_2) odba2.Dispose()
Private Sub dtg46109026_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dtg46109026.CellContentClick
End Sub
Private Sub dtg146109026_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dtg146109026.CellContentClick
Public Class Form15 Dim vesa As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim tabel As New DataTable Private Sub Form15_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim deka As New OleDb.OleDbDataAdapter deka = New OleDb.OleDbDataAdapter("select * from barang", vesa) vesa.Rows.Clear() deka.Fill(vesa) DGV1_052.DataSource = vesa deka.Dispose() End Sub End Class
Public Class Form16
Dim DT As New DataTable Dim VESA As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source =" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Private Sub Form16_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim deka As New OleDb.OleDbDataAdapter deka = New OleDb.OleDbDataAdapter("select * from mastertransaksi", VESA) deka.Fill(DT) deka.Dispose() DGV1_052.DataSource = DT End Sub End Class
Public Class Form17 Dim DT As New DataTable Dim vero As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source =" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Private Sub Form17_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim deka As New OleDb.OleDbDataAdapter deka = New OleDb.OleDbDataAdapter("select * from detailtransaksi", vero) deka.Fill(DT) deka.Dispose() DGV1_052.DataSource = DT End Sub
Public Class Form15 Dim vesa As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim tabel As New DataTable Private Sub Form15_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim deka As New OleDb.OleDbDataAdapter deka = New OleDb.OleDbDataAdapter("select * from barang", vesa) vesa.Rows.Clear() deka.Fill(vesa) DGV1_052.DataSource = vesa deka.Dispose() End Sub End Class
Public Class Form16 Dim DT As New DataTable Dim VESA As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source =" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Private Sub Form16_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim deka As New OleDb.OleDbDataAdapter deka = New OleDb.OleDbDataAdapter("select * from mastertransaksi", VESA) deka.Fill(DT) deka.Dispose() DGV1_052.DataSource = DT End Sub End Class
Public Class Form17 Dim DT As New DataTable Dim vero As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source =" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Private Sub Form17_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim deka As New OleDb.OleDbDataAdapter deka = New OleDb.OleDbDataAdapter("select * from detailtransaksi", vero) deka.Fill(DT) deka.Dispose() DGV1_052.DataSource = DT End Sub End Class
Dim DT As New DataTable Dim vesa As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source =" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Private Sub Form18_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim deka As New OleDb.OleDbDataAdapter deka = New OleDb.OleDbDataAdapter("SELECT BARANG.KODEBARANG, BARANG.NAMABARANG, DETAILTRANSAKSI.NOTRANS, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA FROM BARANG INNER JOIN DETAILTRANSAKSI ON BARANG.KODEBARANG = DETAILTRANSAKSI.KODEBARANG", vesa) deka.Fill(DT) deka.Dispose() DGV1_052.DataSource = DT End Sub End Class Public Class Form19 Dim DT As New DataTable Dim VESA As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source =" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Private Sub Form19_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim deka As New OleDb.OleDbDataAdapter deka = New OleDb.OleDbDataAdapter("SELECT MASTERTRANSAKSI.NOTRANS, MASTERTRANSAKSI.TANGGALTRANSAKSI, MASTERTRANSAKSI.JENISTRANSAKSI, DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA FROM DETAILTRANSAKSI INNER JOIN MASTERTRANSAKSI ON DETAILTRANSAKSI.NOTRANS = MASTERTRANSAKSI.NOTRANS", VESA) deka.Fill(DT) deka.Dispose() DGV1_052.DataSource = DT End Sub End Class Public Class Form20 Dim DT As New DataTable Dim vesa As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source =" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Private Sub FormLoad(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim deka As New OleDb.OleDbDataAdapter deka = New OleDb.OleDbDataAdapter("SELECT BARANG.KODEBARANG, BARANG.NAMABARANG, MASTERTRANSAKSI.NOTRANS, MASTERTRANSAKSI.TANGGALTRANSAKSI, MASTERTRANSAKSI.JENISTRANSAKSI, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA FROM (BARANG INNER JOIN DETAILTRANSAKSI ON BARANG.KODEBARANG = DETAILTRANSAKSI.KODEBARANG) INNER JOIN MASTERTRANSAKSI ON DETAILTRANSAKSI.NOTRANS = MASTERTRANSAKSI.NOTRANS", vesa) deka.Fill(DT) deka.Dispose() DGV1_052.DataSource = DT End Sub End Class
Public Class Form21 Dim vesa As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source =" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Dim DT1 As New DataTable Dim DT2 As New DataTable
Dim DS As New DataSet
Dim BS1 As New BindingSource Dim BS2 As New BindingSource
Private Sub Form21_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim de As New OleDb.OleDbDataAdapter Dim ka As New OleDb.OleDbDataAdapter
de = New OleDb.OleDbDataAdapter("select * from mastertransaksi", vesa) de.Fill(DT1) de.Dispose()
ka = New OleDb.OleDbDataAdapter("select * from detailtransaksi", vesa) ka.Fill(DT2) ka.Dispose()
DGV1_052.DataSource = BS1 DGV2_052.DataSource = BS2 End Sub End Class
Public Class Form22 Dim vesa As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source =" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Dim DT1 As New DataTable Dim DT2 As New DataTable
Dim DS As New DataSet
Dim BS1 As New BindingSource Dim BS2 As New BindingSource
Private Sub Form22_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim de As New OleDb.OleDbDataAdapter Dim ka As New OleDb.OleDbDataAdapter
de = New OleDb.OleDbDataAdapter("select * from mastertransaksi", vesa) de.Fill(DT1) de.Dispose()
ka = New OleDb.OleDbDataAdapter("SELECT DETAILTRANSAKSI.NOTRANS, DETAILTRANSAKSI.HARGA, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.KODEBARANG, BARANG.NAMABARANG, [DETAILTRANSAKSI]![UNIT]*[BARANG]![HARGAJUAL] AS JUMLAHSTANDAR, [DETAILTRANSAKSI]![UNIT]*[DETAILTRANSAKSI]![HARGA] AS JUMLAHREALISASI FROM BARANG INNER JOIN DETAILTRANSAKSI ON BARANG.KODEBARANG = DETAILTRANSAKSI.KODEBARANG", vesa) ka.Fill(DT2) ka.Dispose()
Faradillah Amalia Rivai
BalasHapusTugas 15
Public Class latihan15_46109010
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim faradillah As New DataTable
Private Sub Latihan15_46109010Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim fara As New OleDb.OleDbDataAdapter
fara = New OleDb.OleDbDataAdapter("select * from barang", CONECT)
faradillah.Rows.Clear()
fara.Fill(faradillah)
data46109010.DataSource = faradillah
fara.Dispose()
End Sub
End Class
TUGAS 16
Public Class latihan16_46109010
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim Faradillah As New DataTable
Private Sub latihan16_46109010Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim fara As New OleDb.OleDbDataAdapter
fara = New OleDb.OleDbDataAdapter("select * from mastertransaksi", CONECT)
Faradillah.Rows.Clear()
fara.Fill(Faradillah)
data46109010.DataSource = Faradillah
fara.Dispose()
End Sub
End Class
TUGAS 17
Public Class latihan17_46109010
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim Faradillah As New DataTable
Private Sub latihan17_46109010Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim fara As New OleDb.OleDbDataAdapter
fara = New OleDb.OleDbDataAdapter("select * from mastertransaksi", CONECT)
Faradillah.Rows.Clear()
fara.Fill(Faradillah)
data46109010.DataSource = Faradillah
fara.Dispose()
End Sub
End Class
Faradillah Amalia Rivai
BalasHapusTUGAS 18
Public Class latihan18_46109010
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim faradillah As New DataTable
Private Sub latihan18_46109010Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim fara As New OleDb.OleDbDataAdapter
fara = New OleDb.OleDbDataAdapter("select barang.kodebarang, barang.namabarang, detailtransaksi.notrans, detailtransaksi.unit, detailtransaksi.harga from barang inner join detailtransaksi on barang.kodebarang=detailtransaksi.kodebarang", CONECT)
faradillah.Rows.Clear()
fara.Fill(faradillah)
data46109010.DataSource = faradillah
fara.Dispose()
End Sub
End Class
TUGAS 19
Public Class latihan19_46109010
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim Faradillah As New DataTable
Private Sub latihan19_46109010Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim fara As New OleDb.OleDbDataAdapter
fara = New OleDb.OleDbDataAdapter("select mastertransaksi.notrans, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.kodebarang, detailtransaksi.unit, detailtransaksi.harga from mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans", CONECT)
Faradillah.Rows.Clear()
fara.Fill(Faradillah)
data46109010.DataSource = Faradillah
fara.Dispose()
End Sub
End Class
TUGAS 20
Public Class latihan20_46109010
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim Faradillah As New DataTable
Private Sub latihan20_46109010Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim Fara As New OleDb.OleDbDataAdapter
Fara = New OleDb.OleDbDataAdapter("select barang.kodebarang, barang.namabarang, mastertransaksi.notrans, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.unit, detailtransaksi.harga from (mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans) inner join barang on detailtransaksi.kodebarang=barang.kodebarang", CONECT)
Faradillah.Rows.Clear()
Fara.Fill(Faradillah)
data46109010.DataSource = Faradillah
Fara.Dispose()
End Sub
End Class
Faradillah Amalia Rivai
BalasHapusTUGAS 21
Public Class latihan21_46109010
Dim hubung As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source =" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Dim Faradillah1 As New DataTable
Dim Faradillah2 As New DataTable
Dim VR As New DataSet
Dim fara1 As New BindingSource
Dim fara2 As New BindingSource
Private Sub latihan21_46109010Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim alfa1 As New OleDb.OleDbDataAdapter
Dim alfa2 As New OleDb.OleDbDataAdapter
alfa1 = New OleDb.OleDbDataAdapter("select * from mastertransaksi", hubung)
alfa1.Fill(Faradillah1)
alfa1.Dispose()
alfa2 = New OleDb.OleDbDataAdapter("select * from detailtransaksi", hubung)
alfa2.Fill(Faradillah2)
alfa2.Dispose()
VR.Tables.Add(Faradillah1)
VR.Tables.Add(Faradillah2)
Faradillah1.TableName = "jl"
Faradillah2.TableName = "dp"
VR.Relations.Add(New DataRelation("ms", VR.Tables("jl").Columns("notrans"), VR.Tables("dp").Columns("notrans")))
fara1.DataSource = VR
fara1.DataMember = "jl"
fara2.DataSource = fara1
fara2.DataMember = "ms"
data146109010.DataSource = fara1
data246109010.DataSource = fara2
End Sub
End Class
TUGAS 22
Public Class latihan22_46109010
Dim hubung As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source =" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Dim Faradillah1 As New DataTable
Dim faradillah2 As New DataTable
Dim VR As New DataSet
Dim fara1 As New BindingSource
Dim fara2 As New BindingSource
Private Sub latihan22_46109010Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim alfa1 As New OleDb.OleDbDataAdapter
Dim alfa2 As New OleDb.OleDbDataAdapter
alfa1 = New OleDb.OleDbDataAdapter("select * from mastertransaksi", hubung)
alfa1.Fill(Faradillah1)
alfa1.Dispose()
alfa2 = New OleDb.OleDbDataAdapter("select * from detailtransaksi", hubung)
alfa2.Fill(faradillah2)
alfa2.Dispose()
VR.Tables.Add(Faradillah1)
VR.Tables.Add(faradillah2)
Faradillah1.TableName = "jl"
faradillah2.TableName = "dp"
VR.Relations.Add(New DataRelation("ms", VR.Tables("jl").Columns("notrans"), VR.Tables("dp").Columns("notrans")))
fara1.DataSource = VR
fara1.DataMember = "jl"
fara2.DataSource = fara1
fara2.DataMember = "ms"
data146109010.DataSource = fara1
data246109010.DataSource = fara2
End Sub
End Class
Public Class Latihan_15_46109060
BalasHapusDim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim DT As New DataTable
Private Sub Latihan15_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim fadli As New OleDb.OleDbDataAdapter
fadli = New OleDb.OleDbDataAdapter("select * from barang", CONECT)
DT.Rows.Clear()
fadli.Fill(DT)
Data46109060.DataSource = DT
fadli.Dispose()
End Sub
End Class
Public Class latihan_16_46109060
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim DT As New DataTable
Private Sub latihan_16_46109060_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim fadli As New OleDb.OleDbDataAdapter
fadli = New OleDb.OleDbDataAdapter("select * from mastertransaksi", CONECT)
DT.Rows.Clear()
fadli.Fill(DT)
Data46109060.DataSource = DT
fadli.Dispose()
End Sub
End Class
Public Class latihan_17_46109060
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim DT As New DataTable
Private Sub latihan_17_46109060_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim fadli As New OleDb.OleDbDataAdapter
fadli = New OleDb.OleDbDataAdapter("select * from mastertransaksi", CONECT)
DT.Rows.Clear()
fadli.Fill(DT)
Data46109060.DataSource = DT
fadli.Dispose()
End Sub
End Class
Public Class latihan_18_46109060
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim DT As New DataTable
Private Sub latihan_18_46109060_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim fadli As New OleDb.OleDbDataAdapter
fadli = New OleDb.OleDbDataAdapter("select barang.kodebarang, barang.namabarang, detailtransaksi.dtc, detailtransaksi.unit, detailtransaksi.harga from barang inner join detailtransaksi on barang.kodebarang=detailtransaksi.kodebarang", CONECT)
DT.Rows.Clear()
fadli.Fill(DT)
Data46109060.DataSource = DT
fadli.Dispose()
End Sub
End Class
Public Class latihan_19_46109060
BalasHapusDim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim DT As New DataTable
Private Sub latihan_19_46109060_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim fadli As New OleDb.OleDbDataAdapter
fadli = New OleDb.OleDbDataAdapter("select mastertransaksi.dtc, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.kodebarang, detailtransaksi.unit, detailtransaksi.harga from mastertransaksi inner join detailtransaksi on mastertransaksi.dtc=detailtransaksi.dtc", CONECT)
DT.Rows.Clear()
fadli.Fill(DT)
Data46109060.DataSource = DT
fadli.Dispose()
End Sub
End Class
Public Class latihan_20_46109060
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim DT As New DataTable
Private Sub latihan_20_46109060_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim fadli As New OleDb.OleDbDataAdapter
fadli = New OleDb.OleDbDataAdapter("select barang.kodebarang, barang.namabarang, mastertransaksi.dtc, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.unit, detailtransaksi.harga from (mastertransaksi inner join detailtransaksi on mastertransaksi.dtc=detailtransaksi.dtc) inner join barang on detailtransaksi.kodebarang=barang.kodebarang", CONECT)
DT.Rows.Clear()
fadli.Fill(DT)
Data46109060.DataSource = DT
fadli.Dispose()
End Sub
End Class
Public Class latihan1546109044
BalasHapusDim Jembatan As New OleDb.OleDbConnection(" Provider=Microsoft.ACE.OLEDB.12.0;Data Source= D:\berbagi\sharing2\LATIHAN 15-26 MENGAKSES DATA\DataTransaksiJualBeli.accdb")
Dim Bakpenampung As New DataTable
Private Sub latihan1546109044_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim X As New OleDb.OleDbDataAdapter
X = New OleDb.OleDbDataAdapter("select* from barang", Jembatan)
X.Fill(Bakpenampung)
X.Dispose()
DataGridView1.DataSource = Bakpenampung
End Sub
End Class
Public Class latihan1646109044
Dim Jembatan As New OleDb.OleDbConnection(" Provider=Microsoft.ACE.OLEDB.12.0;Data Source= D:\berbagi\sharing2\LATIHAN 15-26 MENGAKSES DATA\DataTransaksiJualBeli.accdb")
Dim Bakpenampung As New DataTable
Private Sub latihan1646109044_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim X As New OleDb.OleDbDataAdapter
X = New OleDb.OleDbDataAdapter("select* FROM MASTERTRANSAKSI", Jembatan)
X.Fill(Bakpenampung)
X.Dispose()
DGV146109044.DataSource = Bakpenampung
End Sub
End Class
Public Class latihan1746109044
Dim Jembatan As New OleDb.OleDbConnection(" Provider=Microsoft.ACE.OLEDB.12.0;Data Source= D:\berbagi\sharing2\LATIHAN 15-26 MENGAKSES DATA\DataTransaksiJualBeli.accdb")
Dim Bakpenampung As New DataTable
Private Sub latihan1746109044_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim X As New OleDb.OleDbDataAdapter
X = New OleDb.OleDbDataAdapter("select* FROM DETAILTRANSAKSI", Jembatan)
X.Fill(Bakpenampung)
X.Dispose()
DGV46109044.DataSource = Bakpenampung
End Sub
End Class
Public Class Latihan1546109047
BalasHapusDim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim muhitha As New DataTable
Private Sub Latihan1546109047_load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim itha As New OleDb.OleDbDataAdapter
itha = New OleDb.OleDbDataAdapter("select * from barang", CONECT)
muhitha.Rows.Clear()
itha.Fill(muhitha)
DG46109047.DataSource = muhitha
itha.Dispose()
End Sub
End Class
Public Class Latihan1646109047
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim muhitha As New DataTable
Private Sub Latihan1546109047_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim itha As New OleDb.OleDbDataAdapter
itha = New OleDb.OleDbDataAdapter("select * from mastertransaksi", CONECT)
muhitha.Rows.Clear()
itha.Fill(muhitha)
DG46109047.DataSource = muhitha
itha.Dispose()
End Sub
End Class
Public Class Latihan1746109047
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim muhitha As New DataTable
Private Sub Latihan1746109051_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim itha As New OleDb.OleDbDataAdapter
itha = New OleDb.OleDbDataAdapter("select * FROM DETAILTRANSAKSI", CONECT)
muhitha.Rows.Clear()
itha.Fill(muhitha)
DG46109047.DataSource = muhitha
itha.Dispose()
End Sub
End Class
Public Class Latihan1846109047
BalasHapusDim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim muhitha As New DataTable
Private Sub Latihan1846109047_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim itha As New OleDb.OleDbDataAdapter
itha = New OleDb.OleDbDataAdapter("select mastertransaksi.notrans, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.kodebarang, detailtransaksi.unit, detailtransaksi.harga from mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans", CONECT)
muhitha.Rows.Clear()
itha.Fill(muhitha)
DG46109047.DataSource = muhitha
itha.Dispose()
End Sub
End Class
Public Class Latihan1946109047
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim muhitha As New DataTable
Private Sub Latihan1946109047_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim itha As New OleDb.OleDbDataAdapter
itha = New OleDb.OleDbDataAdapter("select mastertransaksi.notrans, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.kodebarang, detailtransaksi.unit, detailtransaksi.harga from mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans", CONECT)
muhitha.Rows.Clear()
itha.Fill(muhitha)
DG46109047.DataSource = muhitha
itha.Dispose()
End Sub
End Class
Public Class Latihan2046109047
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim muhitha As New DataTable
Private Sub Latihan2046109047_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim itha As New OleDb.OleDbDataAdapter
itha = New OleDb.OleDbDataAdapter("select barang.kodebarang, barang.namabarang, mastertransaksi.notrans, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.unit, detailtransaksi.harga from (mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans) inner join barang on detailtransaksi.kodebarang=barang.kodebarang", CONECT)
muhitha.Rows.Clear()
itha.Fill(muhitha)
DG46109047.DataSource = muhitha
muhitha.Dispose()
End Sub
End Class
Public Class Latihan2146109047
BalasHapusDim koneksi As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source =" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Dim tabel01 As New DataTable
Dim tabel02 As New DataTable
Dim ds As New DataSet
Dim bs1 As New BindingSource
Dim bs2 As New BindingSource
Private Sub Latihan2146109047_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim adapter1 As New OleDb.OleDbDataAdapter
Dim adapter2 As New OleDb.OleDbDataAdapter
adapter1 = New OleDb.OleDbDataAdapter("select * from mastertransaksi", koneksi)
adapter1.Fill(tabel01)
adapter1.Dispose()
adapter2 = New OleDb.OleDbDataAdapter("select * from detailtransaksi", koneksi)
adapter2.Fill(tabel02)
adapter2.Dispose()
ds.Tables.Add(tabel01)
ds.Tables.Add(tabel02)
tabel01.TableName = "muhitha"
tabel02.TableName = "itha"
ds.Relations.Add(New DataRelation("itha", ds.Tables("muhitha").Columns("notrans"), ds.Tables("itha").Columns("notrans")))
bs1.DataSource = ds
bs1.DataMember = "muhitha"
bs2.DataSource = bs1
bs2.DataMember = "itha"
DG146109047.DataSource = bs1
DG246109047.DataSource = bs2
End Sub
End Class
Public Class Latihan2246109047
Dim koneksi As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source =" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Dim tabel01 As New DataTable
Dim tabel02 As New DataTable
Dim ds As New DataSet
Dim bs1 As New BindingSource
Dim bs2 As New BindingSource
Private Sub latihan2246109047_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim adapter1 As New OleDb.OleDbDataAdapter
Dim adapter2 As New OleDb.OleDbDataAdapter
adapter1 = New OleDb.OleDbDataAdapter("select * from mastertransaksi", koneksi)
adapter1.Fill(tabel01)
adapter1.Dispose()
adapter2 = New OleDb.OleDbDataAdapter("select * from detailtransaksi", koneksi)
adapter2.Fill(tabel02)
adapter2.Dispose()
ds.Tables.Add(tabel01)
ds.Tables.Add(tabel02)
tabel01.TableName = "muhitha"
tabel02.TableName = "itha"
ds.Relations.Add(New DataRelation("itha", ds.Tables("muhitha").Columns("notrans"), ds.Tables("itha").Columns("notrans")))
bs1.DataSource = ds
bs1.DataMember = "muhitha"
bs2.DataSource = bs1
bs2.DataMember = "itha"
DG146109047.DataSource = bs1
DG246109047.DataSource = bs2
End Sub
End Class
Komentar ini telah dihapus oleh pengarang.
BalasHapusPublic Class latihan1546109058
BalasHapusDim Penghubung As New OleDb.OleDbConnection(" Provider=microsoft.ace.oledb.12.0;data source= “ & Application.StartupPath & “\datatransaksijualbeli.accdb")
Dim Bakpenampung As New DataTable
Private Sub latihan1546109058_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim X As New OleDb.OleDbDataAdapter
X = New OleDb.OleDbDataAdapter("select* from barang", Penghubung)
X.Fill(Bakpenampung)
X.Dispose()
DataGridView1.DataSource = Bakpenampung
End Sub
End Class
Public Class latihan1646109058
Dim Penghubung As New OleDb.OleDbConnection(" Provider=microsoft.ace.oledb.12.0;data source= “ & Application.StartupPath & “\datatransaksijualbeli.accdb")
Dim Bakpenampung As New DataTable
Private Sub latihan1646109058_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim X As New OleDb.OleDbDataAdapter
X = New OleDb.OleDbDataAdapter("select* FROM MASTERTRANSAKSI", Penghubung)
X.Fill(Bakpenampung)
X.Dispose()
DGV146109058.DataSource = Bakpenampung
End Sub
End Class
Public Class latihan1746109058
Dim Penghubung As New OleDb.OleDbConnection(" Provider=microsoft.ace.oledb.12.0;data source= “ & Application.StartupPath & “\datatransaksijualbeli.accdb")
Dim Bakpenampung As New DataTable
Private Sub latihan1746109058_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim X As New OleDb.OleDbDataAdapter
X = New OleDb.OleDbDataAdapter("select* FROM DETAILTRANSAKSI", Penghubung)
X.Fill(Bakpenampung)
X.Dispose()
DGV46109058.DataSource = Bakpenampung
End Sub
End Class
Public Class latihan1846109058
BalasHapusDim Penghubung As New OleDb.OleDbConnection(" Provider=microsoft.ace.oledb.12.0;data source= “ & Application.StartupPath & “\datatransaksijualbeli.accdb")
Dim Bakpenampung As New DataTable
Private Sub Latihan01836109054_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim X As New OleDb.OleDbDataAdapter
X = New OleDb.OleDbDataAdapter("select detailtransaksi.notrans,Detailtransaksi.Unit,detailtransaksi.Harga,barang.namabarang,barang.kodebarang from detailTransaksi Inner Join Barang On Detailtransaksi.kodebarang = barang.kodebarang", Penghubung)
X.Fill(Bakpenampung)
X.Dispose()
DGV146109058.DataSource = Bakpenampung
End Sub
End Class
Public Class latihan1946109058
Dim Penghubung As New OleDb.OleDbConnection(" Provider=microsoft.ace.oledb.12.0;data source= “ & Application.StartupPath & “\datatransaksijualbeli.accdb")
Dim Bakpenampung As New DataTable
Private Sub Latihan1946109058_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim X As New OleDb.OleDbDataAdapter
X = New OleDb.OleDbDataAdapter("select mastertransaksi.notrans,mastertransaksi.tanggaltransaksi,mastertransaksi.jenistransaksi,detailtransaksi.kodebarang,Detailtransaksi.Unit,detailtransaksi.Harga from masterTransaksi Inner Join Detailtransaksi On mastertransaksi.notrans = Detailtransaksi.notrans", Penghubung)
X.Fill(Bakpenampung)
X.Dispose()
DGV_46109058.DataSource = Bakpenampung
End Sub
End Class
Public Class latihan2046109058
Dim Penghubung As New OleDb.OleDbConnection(" Provider=microsoft.ace.oledb.12.0;data source= “ & Application.StartupPath & “\datatransaksijualbeli.accdb")
Dim Bakpenampung As New DataTable
Private Sub latihan2046109058_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim X As New OleDb.OleDbDataAdapter
X = New OleDb.OleDbDataAdapter("select barang.kodebarang,barang.namabarang,mastertransaksi.notrans,mastertransaksi.tanggaltransaksi,mastertransaksi.jenistransaksi,Detailtransaksi.Unit,detailtransaksi.Harga from (mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans) inner join barang on detailtransaksi.kodebarang=barang.kodebarang", Penghubung)
X.Fill(Bakpenampung)
X.Dispose()
DGV_46109058.DataSource = Bakpenampung
End Sub
End Class
Public Class latihan2146109058
BalasHapusDim Konek As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source =d:\berbagi\sharing2\LATIHAN 15-26 MENGAKSES DATA\DataTransaksiJualBeli.accdb")
Dim Bak As New DataTable
Dim Mandi As New DataTable
Dim dtset As New DataSet
Dim bs1 As New BindingSource
Dim bs2 As New BindingSource
Private Sub latihan2146109058_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim x As New OleDb.OleDbDataAdapter
x = New OleDb.OleDbDataAdapter("select * from mastertransaksi ", Konek)
x.Fill(Bak)
x.Dispose()
Dim y As New OleDb.OleDbDataAdapter
y = New OleDb.OleDbDataAdapter("select * from DETAILTRANSAKSI ", Konek)
y.Fill(Mandi)
y.Dispose()
Bak.TableName = "ibu"
Mandi.TableName = "anak"
dtset.Tables.Add(Bak)
dtset.Tables.Add(Mandi)
dtset.Relations.Add(New DataRelation("hubung1", dtset.Tables("ibu").Columns("NOTRANS"), dtset.Tables("anak").Columns("NOTRANS")))
bs1.DataSource = dtset
bs1.DataMember = "ibu"
bs2.DataSource = bs1
bs2.DataMember = "hubung1"
DGV1_461090584.DataSource = bs1
DGV2_461090584.DataSource = bs2
End Sub
End Class
Public Class latihan2246109058
Dim Konek As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source =d:\berbagi\sharing2\LATIHAN 15-26 MENGAKSES DATA\DataTransaksiJualBeli.accdb")
Dim Bak As New DataTable
Dim Mandi As New DataTable
Dim dtset As New DataSet
Dim bs1 As New BindingSource
Dim bs2 As New BindingSource
Private Sub latihan2246109058_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim x As New OleDb.OleDbDataAdapter
x = New OleDb.OleDbDataAdapter("select * from mastertransaksi ", Konek)
x.Fill(Bak)
x.Dispose()
Dim y As New OleDb.OleDbDataAdapter
y = New OleDb.OleDbDataAdapter("select DETAILTRANSAKSI.NOTRANS,DETAILTRANSAKSI.KODEBARANG,DETAILTRANSAKSI.UNIT,DETAILTRANSAKSI.HARGA,BARANG.NAMABARANG, UNIT * HARGA AS JUMLAHREALISASI, UNIT * HARGAJUAL AS JUMLAHSTANDAR FROM DETAILTRANSAKSI INNER JOIN BARANG ON DETAILTRANSAKSI.KODEBARANG = BARANG.KODEBARANG ", Konek)
y.Fill(Mandi)
y.Dispose()
Bak.TableName = "ibu"
Mandi.TableName = "anak"
dtset.Tables.Add(Bak)
dtset.Tables.Add(Mandi)
dtset.Relations.Add(New DataRelation("hubung1", dtset.Tables("ibu").Columns("NOTRANS"), dtset.Tables("anak").Columns("NOTRANS")))
bs1.DataSource = dtset
bs1.DataMember = "ibu"
bs2.DataSource = bs1
bs2.DataMember = "hubung1"
DGV1_46109058.DataSource = bs1
DGV2_46109058.DataSource = bs2
End Sub
End Class
Public Class Latihan15_46109050
BalasHapusDim ODB As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source =" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Dim DT As New DataTable
Private Sub Latihan15_46109050Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim RISKY As New OleDb.OleDbDataAdapter
RISKY = New OleDb.OleDbDataAdapter("select * from barang", ODB)
DT.Rows.Clear()
RISKY.Fill(DT)
DGV_46109050.DataSource = DT
RISKY.Dispose()
End Sub
End Class
Public Class Latihan16_46109050
Dim ODB As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source =" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Dim DT As New DataTable
Private Sub Latihan16_46109050Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim RISKY As New OleDb.OleDbDataAdapter
RISKY = New OleDb.OleDbDataAdapter("select * from mastertransaksi", ODB)
RISKY.Fill(DT)
RISKY.Dispose()
DGV_46109050.DataSource = DT
End Sub
End Class
Public Class Latihan17_46109050
Dim ODB As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source =" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Dim DT As New DataTable
Private Sub Latihan17_46109050Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim RISKY As New OleDb.OleDbDataAdapter
RISKY = New OleDb.OleDbDataAdapter("select * from detailtransaksi", ODB)
RISKY.Fill(DT)
RISKY.Dispose()
DGV_46109050.DataSource = DT
End Sub
End Class
Public Class Latihan18_46109050
BalasHapusDim ODB As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source =" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Dim DT As New DataTable
Private Sub Latihan18_46109050Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim RISKY As New OleDb.OleDbDataAdapter
RISKY = New OleDb.OleDbDataAdapter("SELECT BARANG.KODEBARANG, BARANG.NAMABARANG, DETAILTRANSAKSI.NOTRANS, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA FROM BARANG INNER JOIN DETAILTRANSAKSI ON BARANG.KODEBARANG = DETAILTRANSAKSI.KODEBARANG", ODB)
RISKY.Fill(DT)
RISKY.Dispose()
DGV_46109050.DataSource = DT
End Sub
End Class
Public Class Latihan19_46109050
Dim ODB As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source =" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Dim DT As New DataTable
Private Sub Latihan19_46109050Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim RISKY As New OleDb.OleDbDataAdapter
RISKY = New OleDb.OleDbDataAdapter("SELECT MASTERTRANSAKSI.NOTRANS, MASTERTRANSAKSI.TANGGALTRANSAKSI, MASTERTRANSAKSI.JENISTRANSAKSI, DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA FROM DETAILTRANSAKSI INNER JOIN MASTERTRANSAKSI ON DETAILTRANSAKSI.NOTRANS = MASTERTRANSAKSI.NOTRANS", ODB)
RISKY.Fill(DT)
RISKY.Dispose()
DGV_46109050.DataSource = DT
End Sub
End Class
Public Class Latihan20_46109050
Dim ODB As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source =" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Dim DT As New DataTable
Private Sub Latihan20_46109050Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim RISKY As New OleDb.OleDbDataAdapter
RISKY = New OleDb.OleDbDataAdapter("SELECT BARANG.KODEBARANG, BARANG.NAMABARANG, MASTERTRANSAKSI.NOTRANS, MASTERTRANSAKSI.TANGGALTRANSAKSI, MASTERTRANSAKSI.JENISTRANSAKSI, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA FROM (BARANG INNER JOIN DETAILTRANSAKSI ON BARANG.KODEBARANG = DETAILTRANSAKSI.KODEBARANG) INNER JOIN MASTERTRANSAKSI ON DETAILTRANSAKSI.NOTRANS = MASTERTRANSAKSI.NOTRANS", ODB)
RISKY.Fill(DT)
RISKY.Dispose()
DGV_46109050.DataSource = DT
End Sub
End Class
Public Class Latihan21_46109050
BalasHapusDim ODB As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source =" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Dim RISKY1 As New DataTable
Dim RISKY2 As New DataTable
Dim ds As New DataSet
Dim MAHIRA1 As New BindingSource
Dim MAHIRA2 As New BindingSource
Private Sub Latihan21_46109050Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim a As New OleDb.OleDbDataAdapter
Dim b As New OleDb.OleDbDataAdapter
a = New OleDb.OleDbDataAdapter("select * from mastertransaksi", ODB)
a.Fill(RISKY1)
a.Dispose()
b = New OleDb.OleDbDataAdapter("select * from detailtransaksi", ODB)
b.Fill(RISKY2)
b.Dispose()
ds.Tables.Add(RISKY1)
ds.Tables.Add(RISKY2)
RISKY1.TableName = "faisal1"
RISKY2.TableName = "faisal2"
ds.Relations.Add(New DataRelation("ical", ds.Tables("faisal1").Columns("notrans"), ds.Tables("faisal2").Columns("notrans")))
MAHIRA1.DataSource = ds
MAHIRA1.DataMember = "faisal1"
MAHIRA2.DataSource = MAHIRA1
MAHIRA2.DataMember = "ical"
QQ1_46109050.DataSource = MAHIRA1
QQ2_46109050.DataSource = MAHIRA2
End Sub
End Class
Public Class Latihan22_46109050
Dim ODB As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source =" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Dim RISKY1 As New DataTable
Dim RISKY2 As New DataTable
Dim ds As New DataSet
Dim MAHIRA1 As New BindingSource
Dim MAHIRA2 As New BindingSource
Private Sub Latihan22_46109050Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim a As New OleDb.OleDbDataAdapter
Dim b As New OleDb.OleDbDataAdapter
a = New OleDb.OleDbDataAdapter("select * from mastertransaksi", ODB)
a.Fill(RISKY1)
a.Dispose()
b = New OleDb.OleDbDataAdapter("SELECT DETAILTRANSAKSI.NOTRANS, DETAILTRANSAKSI.HARGA, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.KODEBARANG, BARANG.NAMABARANG, [DETAILTRANSAKSI]![UNIT]*[BARANG]![HARGAJUAL] AS JUMLAHSTANDAR, [DETAILTRANSAKSI]![UNIT]*[DETAILTRANSAKSI]![HARGA] AS JUMLAHREALISASI FROM BARANG INNER JOIN DETAILTRANSAKSI ON BARANG.KODEBARANG = DETAILTRANSAKSI.KODEBARANG", ODB)
b.Fill(RISKY2)
b.Dispose()
ds.Tables.Add(RISKY1)
ds.Tables.Add(RISKY2)
RISKY1.TableName = "faisal1"
RISKY2.TableName = "faisal2"
ds.Relations.Add(New DataRelation("ical", ds.Tables("faisal1").Columns("notrans"), ds.Tables("faisal2").Columns("notrans")))
MAHIRA1.DataSource = ds
MAHIRA1.DataMember = "faisal1"
MAHIRA2.DataSource = MAHIRA1
MAHIRA2.DataMember = "ical"
QQ1_46109050.DataSource = MAHIRA1
QQ2_46109050.DataSource = MAHIRA2
End Sub
End Class
Public Class latihan1546109026
BalasHapusDim jalan As New OleDb.OleDbConnection(" Provider=Microsoft.ACE.OLEDB.12.0;Data Source =" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Dim Bakpenampung As New DataTable
Private Sub latihan1546109026_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim X As New OleDb.OleDbDataAdapter
X = New OleDb.OleDbDataAdapter("select* from barang", jalan)
X.Fill(Bakpenampung)
dtg46109026.DataSource = Bakpenampung
X.Dispose()
End Sub
Private Sub dtg46109026_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dtg46109026.CellContentClick
End Sub
End Class
Public Class latihan1646109026
Dim jalan As New OleDb.OleDbConnection(" Provider=Microsoft.ACE.OLEDB.12.0;Data Source =" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Dim detailtransaksi As New DataTable
Private Sub latihan1646109026_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim adapter As New OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select* from mastertransaksi", jalan)
adapter.Fill(detailtransaksi)
dtg46109026.DataSource = detailtransaksi
adapter.Dispose()
End Sub
Private Sub dtg46109026_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dtg46109026.CellContentClick
End Sub
End Class
Public Class latihan1746109026
Dim Jalan As New OleDb.OleDbConnection(" Provider=Microsoft.ACE.OLEDB.12.0;Data Source =" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Dim mastertransaksi As New DataTable
Private Sub latihan_17_026_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim adapter As New OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select* from detailtransaksi", Jalan)
adapter.Fill(mastertransaksi)
dtg46109026.DataSource = mastertransaksi
adapter.Dispose()
End Sub
Private Sub dtg46109026_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dtg46109026.CellContentClick
End Sub
End Class
Public Class latihan1846109026
BalasHapus'.OLEDB.12.0;Data Source="D:\Materi\Poltekx\VB8\Materi Apkom4\2010\DataTransaksiJualBeli.accdb'
Dim jalan As New OleDb.OleDbConnection(" Provider=Microsoft.ACE.OLEDB.12.0;Data Source =" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Dim Bakpenampung As New DataTable
Private Sub latihan1846109026_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim adapter As New OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select barang.kodebarang, barang.namabarang, detailtransaksi.notrans, detailtransaksi.unit, detailtransaksi.harga from barang inner join detailtransaksi on barang.kodebarang=detailtransaksi.kodebarang", jalan)
adapter.Fill(Bakpenampung)
dtg46109026.DataSource = Bakpenampung
adapter.Dispose()
End Sub
Private Sub dtg46109026_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dtg46109026.CellContentClick
End Sub
End Class
Public Class latihan1946109026
'.OLEDB.12.0;Data Source="D:\Materi\Poltekx\VB8\Materi Apkom4\2010\DataTransaksiJualBeli.accdb'
Dim jalan As New OleDb.OleDbConnection(" Provider=Microsoft.ACE.OLEDB.12.0;Data Source =" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Dim Bakpenampung As New DataTable
Private Sub latihan1946109026_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim adapter As New OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select mastertransaksi.notrans, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.kodebarang, detailtransaksi.unit, detailtransaksi.harga from mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans", jalan)
adapter.Fill(Bakpenampung)
dtg46109026.DataSource = Bakpenampung
adapter.Dispose()
End Sub
Private Sub dtg46109026_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dtg46109026.CellContentClick
End Sub
End Class
Public Class latihan2046109026
'.OLEDB.12.0;Data Source="D:\Materi\Poltekx\VB8\Materi Apkom4\2010\DataTransaksiJualBeli.accdb'
Dim jalan As New OleDb.OleDbConnection(" Provider=Microsoft.ACE.OLEDB.12.0;Data Source =" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Dim Bakpenampung As New DataTable
Private Sub latihan2046109026_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim adapter As New OleDb.OleDbDataAdapter
adapter = New OleDb.OleDbDataAdapter("select barang.kodebarang, barang.namabarang, mastertransaksi.notrans, mastertransaksi.tanggaltransaksi, mastertransaksi.jenistransaksi, detailtransaksi.unit, detailtransaksi.harga from (mastertransaksi inner join detailtransaksi on mastertransaksi.notrans=detailtransaksi.notrans) inner join barang on detailtransaksi.kodebarang=barang.kodebarang", jalan)
adapter.Fill(Bakpenampung)
dtg46109026.DataSource = Bakpenampung
adapter.Dispose()
End Sub
Private Sub dtg46109026_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dtg46109026.CellContentClick
End Sub
End Class
Public Class latihan2146109026
BalasHapusDim hubung As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source =" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Dim ibeng As New DataTable
Dim ibeng_2 As New DataTable
Dim DS As New DataSet
Dim ibnu As New BindingSource
Dim ibnu_2 As New BindingSource
Private Sub latihan2146109026_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim odba As New OleDb.OleDbDataAdapter
Dim odba2 As New OleDb.OleDbDataAdapter
odba = New OleDb.OleDbDataAdapter("select * from mastertransaksi", hubung)
odba.Fill(ibeng)
odba.Dispose()
odba2 = New OleDb.OleDbDataAdapter("select * from detailtransaksi", hubung)
odba2.Fill(ibeng_2)
odba2.Dispose()
DS.Tables.Add(ibeng)
DS.Tables.Add(ibeng_2)
ibeng.TableName = "induk"
ibeng_2.TableName = "anak"
DS.Relations.Add(New DataRelation("cucu", DS.Tables("induk").Columns("notrans"), DS.Tables("anak").Columns("notrans")))
ibnu.DataSource = DS
ibnu.DataMember = "induk"
ibnu_2.DataSource = ibnu
ibnu_2.DataMember = "cucu"
dtg46109026.DataSource = ibnu
dtg146109026.DataSource = ibnu_2
End Sub
Private Sub dtg46109026_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dtg46109026.CellContentClick
End Sub
Private Sub dtg146109026_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dtg146109026.CellContentClick
End Sub
End Class
Public Class latihan2246109026
Dim hubung As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source =" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Dim ibeng As New DataTable
Dim ibeng_2 As New DataTable
Dim DS As New DataSet
Dim ibnu As New BindingSource
Dim ibnu_2 As New BindingSource
Private Sub latihan2246109026_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim odba As New OleDb.OleDbDataAdapter
Dim odba2 As New OleDb.OleDbDataAdapter
odba = New OleDb.OleDbDataAdapter("select * from mastertransaksi", hubung)
odba.Fill(ibeng)
odba.Dispose()
odba2 = New OleDb.OleDbDataAdapter("select * from detailtransaksi", hubung)
odba2.Fill(ibeng_2)
odba2.Dispose()
DS.Tables.Add(ibeng)
DS.Tables.Add(ibeng_2)
ibeng.TableName = "induk"
ibeng_2.TableName = "anak"
DS.Relations.Add(New DataRelation("cucu", DS.Tables("induk").Columns("notrans"), DS.Tables("anak").Columns("notrans")))
ibnu.DataSource = DS
ibnu.DataMember = "induk"
ibnu_2.DataSource = ibnu
ibnu_2.DataMember = "cucu"
dtg46109026.DataSource = ibnu
dtg146109026.DataSource = ibnu_2
End Sub
Private Sub dtg46109026_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dtg46109026.CellContentClick
End Sub
Private Sub dtg146109026_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dtg146109026.CellContentClick
End Sub
End Class
Public Class Form15
BalasHapusDim vesa As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim tabel As New DataTable
Private Sub Form15_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim deka As New OleDb.OleDbDataAdapter
deka = New OleDb.OleDbDataAdapter("select * from barang", vesa)
vesa.Rows.Clear()
deka.Fill(vesa)
DGV1_052.DataSource = vesa
deka.Dispose()
End Sub
End Class
Public Class Form16
Dim DT As New DataTable
Dim VESA As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source =" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Private Sub Form16_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim deka As New OleDb.OleDbDataAdapter
deka = New OleDb.OleDbDataAdapter("select * from mastertransaksi", VESA)
deka.Fill(DT)
deka.Dispose()
DGV1_052.DataSource = DT
End Sub
End Class
Public Class Form17
Dim DT As New DataTable
Dim vero As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source =" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Private Sub Form17_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim deka As New OleDb.OleDbDataAdapter
deka = New OleDb.OleDbDataAdapter("select * from detailtransaksi", vero)
deka.Fill(DT)
deka.Dispose()
DGV1_052.DataSource = DT
End Sub
Public Class Form15
BalasHapusDim vesa As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim tabel As New DataTable
Private Sub Form15_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim deka As New OleDb.OleDbDataAdapter
deka = New OleDb.OleDbDataAdapter("select * from barang", vesa)
vesa.Rows.Clear()
deka.Fill(vesa)
DGV1_052.DataSource = vesa
deka.Dispose()
End Sub
End Class
Public Class Form16
Dim DT As New DataTable
Dim VESA As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source =" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Private Sub Form16_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim deka As New OleDb.OleDbDataAdapter
deka = New OleDb.OleDbDataAdapter("select * from mastertransaksi", VESA)
deka.Fill(DT)
deka.Dispose()
DGV1_052.DataSource = DT
End Sub
End Class
Public Class Form17
Dim DT As New DataTable
Dim vero As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source =" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Private Sub Form17_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim deka As New OleDb.OleDbDataAdapter
deka = New OleDb.OleDbDataAdapter("select * from detailtransaksi", vero)
deka.Fill(DT)
deka.Dispose()
DGV1_052.DataSource = DT
End Sub
End Class
Public Class Form18
BalasHapusDim DT As New DataTable
Dim vesa As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source =" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Private Sub Form18_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim deka As New OleDb.OleDbDataAdapter
deka = New OleDb.OleDbDataAdapter("SELECT BARANG.KODEBARANG, BARANG.NAMABARANG, DETAILTRANSAKSI.NOTRANS, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA FROM BARANG INNER JOIN DETAILTRANSAKSI ON BARANG.KODEBARANG = DETAILTRANSAKSI.KODEBARANG", vesa)
deka.Fill(DT)
deka.Dispose()
DGV1_052.DataSource = DT
End Sub
End Class
Public Class Form19
Dim DT As New DataTable
Dim VESA As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source =" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Private Sub Form19_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim deka As New OleDb.OleDbDataAdapter
deka = New OleDb.OleDbDataAdapter("SELECT MASTERTRANSAKSI.NOTRANS, MASTERTRANSAKSI.TANGGALTRANSAKSI, MASTERTRANSAKSI.JENISTRANSAKSI, DETAILTRANSAKSI.KODEBARANG, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA FROM DETAILTRANSAKSI INNER JOIN MASTERTRANSAKSI ON DETAILTRANSAKSI.NOTRANS = MASTERTRANSAKSI.NOTRANS", VESA)
deka.Fill(DT)
deka.Dispose()
DGV1_052.DataSource = DT
End Sub
End Class
Public Class Form20
Dim DT As New DataTable
Dim vesa As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source =" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Private Sub FormLoad(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim deka As New OleDb.OleDbDataAdapter
deka = New OleDb.OleDbDataAdapter("SELECT BARANG.KODEBARANG, BARANG.NAMABARANG, MASTERTRANSAKSI.NOTRANS, MASTERTRANSAKSI.TANGGALTRANSAKSI, MASTERTRANSAKSI.JENISTRANSAKSI, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.HARGA FROM (BARANG INNER JOIN DETAILTRANSAKSI ON BARANG.KODEBARANG = DETAILTRANSAKSI.KODEBARANG) INNER JOIN MASTERTRANSAKSI ON DETAILTRANSAKSI.NOTRANS = MASTERTRANSAKSI.NOTRANS", vesa)
deka.Fill(DT)
deka.Dispose()
DGV1_052.DataSource = DT
End Sub
End Class
Public Class Form21
BalasHapusDim vesa As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source =" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Dim DT1 As New DataTable
Dim DT2 As New DataTable
Dim DS As New DataSet
Dim BS1 As New BindingSource
Dim BS2 As New BindingSource
Private Sub Form21_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim de As New OleDb.OleDbDataAdapter
Dim ka As New OleDb.OleDbDataAdapter
de = New OleDb.OleDbDataAdapter("select * from mastertransaksi", vesa)
de.Fill(DT1)
de.Dispose()
ka = New OleDb.OleDbDataAdapter("select * from detailtransaksi", vesa)
ka.Fill(DT2)
ka.Dispose()
DS.Tables.Add(DT1)
DS.Tables.Add(DT2)
DT1.TableName = "vesa1"
DT2.TableName = "vesa2"
DS.Relations.Add(New DataRelation("vero", DS.Tables("vesa1").Columns("notrans"), DS.Tables("vesa2").Columns("notrans")))
BS1.DataSource = DS
BS1.DataMember = "vesa1"
BS2.DataSource = BS1
BS2.DataMember = "vero"
DGV1_052.DataSource = BS1
DGV2_052.DataSource = BS2
End Sub
End Class
Public Class Form22
Dim vesa As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source =" & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
Dim DT1 As New DataTable
Dim DT2 As New DataTable
Dim DS As New DataSet
Dim BS1 As New BindingSource
Dim BS2 As New BindingSource
Private Sub Form22_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim de As New OleDb.OleDbDataAdapter
Dim ka As New OleDb.OleDbDataAdapter
de = New OleDb.OleDbDataAdapter("select * from mastertransaksi", vesa)
de.Fill(DT1)
de.Dispose()
ka = New OleDb.OleDbDataAdapter("SELECT DETAILTRANSAKSI.NOTRANS, DETAILTRANSAKSI.HARGA, DETAILTRANSAKSI.UNIT, DETAILTRANSAKSI.KODEBARANG, BARANG.NAMABARANG, [DETAILTRANSAKSI]![UNIT]*[BARANG]![HARGAJUAL] AS JUMLAHSTANDAR, [DETAILTRANSAKSI]![UNIT]*[DETAILTRANSAKSI]![HARGA] AS JUMLAHREALISASI FROM BARANG INNER JOIN DETAILTRANSAKSI ON BARANG.KODEBARANG = DETAILTRANSAKSI.KODEBARANG", vesa)
ka.Fill(DT2)
ka.Dispose()
DS.Tables.Add(DT1)
ds.Tables.Add(dt2)
DT1.TableName = "vero1"
DT2.TableName = "vero2"
DS.Relations.Add(New DataRelation("nika", DS.Tables("vero1").Columns("notrans"), DS.Tables("vero2").Columns("notrans")))
BS1.DataSource = DS
BS1.DataMember = "vesa1"
BS2.DataSource = BS1
BS2.DataMember = "vero"
DGV1_052.DataSource = BS1
DGV2_052.DataSource = BS2
End Sub
End Class