when i click "button1" on my form..i get field name as ' Expr1002' and the data in it are -1..
i believe it is soemthing to do with the da.fill() .. can u please asssist me with thsi ?
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim con As OleDbConnection = New OleDb.OleDbConnection("provider=microsoft.jet.oledb.4.0;data source=C:\Documents and Settings\bashkark\Desktop\Copy of USERS.mdb")
Dim cmd As New OleDbCommand
con.Open()
cmd = New OleDbCommand("select MFG, MAKE, GRAPHICSCARD AND GRAPHICSVERSION from table1", con)
Dim da As OleDbDataAdapter = New OleDbDataAdapter(cmd)
Try
Dim ds As DataSet = New DataSet()
ds.Tables.Add("table1")
da.Fill(ds, "table1")
DataGridView1.DataSource = ds.Tables("table1").DefaultView
Finally
con.Close()
cmd = Nothing
da.Dispose()
con.Dispose()
End Try
End Sub