Public Class LATIHAN023A36109030 Dim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim sanie As New DataTable Dim baris As DataRow Private Sub LATIHAN023A36109030_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim saya As New OleDb.OleDbDataAdapter saya = New OleDb.OleDbDataAdapter("select * from MASTERTRANSAKSI", conect) saya.Fill(sanie) dgv236109030.DataSource = sanie End Sub End Class
Public Class LATIHAN023B36109030 Dim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb") Dim tes As New DataTable Dim saya As New OleDb.OleDbDataAdapter Public Sub AmbilData() saya = New OleDb.OleDbDataAdapter("select * from DETAILTRANSAKSI where NOTRANS ='" & TextBox136109030.Text & "'", conect) saya.Fill(tes) End Sub Private Sub LATIHAN023B36109030_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load AmbilData() dgv136109030.DataSource = tes End Sub End Class
Public Class LATIHAN023A36109030
BalasHapusDim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim sanie As New DataTable
Dim baris As DataRow
Private Sub LATIHAN023A36109030_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim saya As New OleDb.OleDbDataAdapter
saya = New OleDb.OleDbDataAdapter("select * from MASTERTRANSAKSI", conect)
saya.Fill(sanie)
dgv236109030.DataSource = sanie
End Sub
End Class
Public Class LATIHAN023B36109030
BalasHapusDim conect As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
Dim tes As New DataTable
Dim saya As New OleDb.OleDbDataAdapter
Public Sub AmbilData()
saya = New OleDb.OleDbDataAdapter("select * from DETAILTRANSAKSI where NOTRANS ='" & TextBox136109030.Text & "'", conect)
saya.Fill(tes)
End Sub
Private Sub LATIHAN023B36109030_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
AmbilData()
dgv136109030.DataSource = tes
End Sub
End Class
utk lbh lngkpnya click di www.asrulsanie1.blogspot.com
BalasHapus