Private Sub Move(...) Handles Button2.Click
dt1 = dt.Copy
DataGridView2.DataSource = dt1
End Sub
VB.NET
PrivateSub Update(...) Handles Button3.Click
Dim dataAdapter AsNew OleDb.OleDbDataAdapter(sqlStr2, connStr)
Dim commandbuilder AsNew OleDb.OleDbCommandBuilder(dataAdapter)
dataAdapter.Update(dt1)
EndSub
Code
End Class
All, What I am trying to do is pull info from a table into my datagridview1 (which is fine). Then I want to move that info to datagridview2, then use the update method to move the information from dgv2 back to access into a DIFFERENT table. The error when I delete a record from dgv2 and proceed to update: "Concurrency violation: the DeleteCommand affected 0 of the expected 1 records." .
Any help is appreciated. Thank you, Ashley
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Sam HobbsRank #108 · 20.5K reputationPosted Dec 16, 2010, 6:38 PM EST
Sam HobbsRank #108 · 20.5K reputationPosted Dec 16, 2010, 6:38 PM EST
ashley prince5 reputationPosted Dec 17, 2010, 4:15 AM EST