Hi guys
ok guys this is my problem my DataGridView1 does not show the data on my testdb.mdb i need to fix this first before i continue on adding records on my db i very much appreciate any one who can help me with this.
Imports System.Data.OleDb
Public Class Customer
Dim con As OleDbConnection
Private Sub Customer_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\testdb.mdb"
con.Open()
con.Close()
showItems()
End Sub
Private Sub showItems()
Dim dt As New DataTable
Dim ds As New DataSet
ds.Tables.Add(dt)
Dim da As New OleDbDataAdapter
con.Open()
da = New OleDbDataAdapter("Select * from customer", con)
da.Fill(dt)
DataGridView1.DataSource = dt.DefaultView
con.Close()
End Sub
End Class