Public Class Form28A_36109020
Dim dtb As New DataTable
Dim ksr As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/Databarang.ACCDB")
Public Sub dhedhe()
Dim akbar As New OleDb.OleDbDataAdapter
akbar = New OleDb.OleDbDataAdapter("select * from barang", ksr)
dtb.Rows.Clear()
akbar.Fill(dtb)
akbar.Dispose()
End Sub
Private Sub Latihan_28A_022_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
dhedhe()
dgv_36109020.DataSource = dtb
End Sub
Private Sub input_36109020_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles input_36109020.Click
If Form28B_36109020.Visible = False Then
Form28B_36109020.Show()
Else
Form28B_36109020.Activate()
End If
End Sub
Private Sub tutup_36109020_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tutup_36109020.Click
Close()
End Sub
End Class
Tidak ada komentar:
Posting Komentar