Link to home
Start Free TrialLog in
Avatar of DColin
DColinFlag for Thailand

asked on

Update database from DataGridView.

Hi Experts,

I am populating a DataGridView control using the attached code. Once the user has finished updating the information (Goals scored) the database needs to be updated with this new information. The MatchDate And HomeTeam column provide a unique row identifier. How can I do this, thanks?
Dim SQL As String = "SELECT MatchDate, HomeTeam, AwayTeam, HomeGoals, AwayGoals FROM tblFixtures WHERE MatchDate = '04/04/08'"
Dim cn As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source='db1.mdb';"
Dim adapter As New OleDb.OleDbDataAdapter(SQL, cn)
Dim table As New DataTable()
DataGridView1.DataSource = table

Open in new window

Avatar of Jorge Paulino
Jorge Paulino
Flag of Portugal image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial