Hi I am developing WinForm Application in vb.net and MS access back end. Using datagridview i can able to display the records by simply setting the datasource property of the datagridview. But I don't know how to update the records through datagridview, in vb6 it was very easy to update the records itself it will update the data in database, but in vb.net how to update the records? The following codes i used to display the records in datagridview..
Dim conn As OleDbConnection
Dim cmd As OleDbCommand
Dim adpt As OleDbDataAdapter
Dim rs As DataTable
conn = New OleDbConnection
conn.ConnectionString = "provider=Microsoft.Jet.OLEDB.4.0; Data Source="& Application.StartupPath & "\sample.mdb"
conn.Open()
adpt = New OleDbDataAdapter("select * from table1", conn)
rs = New DataTable
adpt.Fill(rs)
Me.dgv.DataSource = rs
If I modify the data in datagridview it will not affect the databaserecords. Please Help me...