troubleshooting Question

Update database from DataGridView.

Avatar of DColin
DColinFlag for Thailand asked on
Visual Basic.NET
1 Comment1 Solution179 ViewsLast Modified:
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()
 
adapter.Fill(table)
 
DataGridView1.DataSource = table
ASKER CERTIFIED SOLUTION
Jorge Paulino
IT Pro/Developer
Join our community to see this answer!
Unlock 1 Answer and 1 Comment.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 1 Comment.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros