reedone816
Member
- Joined
- Mar 18, 2013
- Messages
- 6
- Programming Experience
- Beginner
please help,
I'm using vb.net 2008 and mysql database. what is wrong with this code? because the change in first row on datagridview is not updated to database.
for example:
my data originally is like this:
row 1: "false"
row 2: "false"
row 3: "false"
then using the above code I change the value in datagridview:
row 1: "true"
row 2: "true"
row 3: "true"
but when I cross check it in the database, the first row is not updated:
row 1: "false"
row 2: "true"
row 3: "true"
I'm using vb.net 2008 and mysql database. what is wrong with this code? because the change in first row on datagridview is not updated to database.
VB.NET:
For i As Integer = 0 To DataGridView1.RowCount - 2
DataGridView1.Rows(i).Cells(11).Value = "true"
Next
XTableAdapter.Update(XDataSet.Tables("Xtable"))
XDataSet.AcceptChanges()
for example:
my data originally is like this:
row 1: "false"
row 2: "false"
row 3: "false"
then using the above code I change the value in datagridview:
row 1: "true"
row 2: "true"
row 3: "true"
but when I cross check it in the database, the first row is not updated:
row 1: "false"
row 2: "true"
row 3: "true"
Last edited: