Public Class Form15
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 Form15_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim veny As New OleDb.OleDbDataAdapter
veny = New OleDb.OleDbDataAdapter("select*from barang", CONECT)
veny.Fill(DT)
dgv1.DataSource = DT
veny.Dispose()
End Sub
End Class
Tidak ada komentar:
Posting Komentar