Kamis, 24 November 2011

Form 17

Public Class Form17

    Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\DataTransaksiJualBeli.accdb")
    Dim AR As New DataTable
    Private Sub Form17_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim ami As New OleDb.OleDbDataAdapter
        ami = New OleDb.OleDbDataAdapter("select * from detailtransaksi", CONECT)
        AR.Rows.Clear()
        ami.Fill(AR)
        DataGridView1.DataSource = AR

        ami.Dispose()

    End Sub
End Class

Tidak ada komentar:

Posting Komentar