Scrift Milik Zani Accounting 2008 D3 A ==> Selamat belajar semuanya!!!
Public Class LATIHAN015012
'DEKLARASI CONECTION
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
'deklarasi data tabel
Dim DT As New DataTable
Private Sub LATIHAN_015_012_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'deklarasi adapter
Dim nisa As New OleDb.OleDbDataAdapter
nisa = New OleDb.OleDbDataAdapter("select * from barang", CONECT) 'mkemunculkan semua data dari tabel barang dlm acces
DT.Rows.Clear() 'membersihkan data table
nisa.Fill(DT) 'mengisi database ke dlm data table
DataGridView1.DataSource = DT 'memunculkan dlm datagridview
nisa.Dispose() 'menghancurkan kendaraan (adapter) yg sdh dipake
End Sub
End Class
Gunakan Account Google anda
BalasHapus