emperror123
Member level 5
dear all
i have do the database but when i debug it, it come out this error which is
Concurrency violation: the UpdateCommand affected 0 of the expected 1 records.
i have search many article from google, i still unable to solve it, below are my coding hopefully you all may help me
the yellow highlight is the one place that error occur
i have do the database but when i debug it, it come out this error which is
Concurrency violation: the UpdateCommand affected 0 of the expected 1 records.
i have search many article from google, i still unable to solve it, below are my coding hopefully you all may help me
Code:
If btnSave.Text = "Save" Then
' DateDonatedDateTimePicker.Text = Today
If SuccessCheckBox.Checked = True Then
RemarkTextBox.Text = "No Remark"
End If
Me.Validate()
Me.DonorStatusBindingSource.EndEdit()
frmBlood.DonorInfoBindingSource.EndEdit()
[SIZE=4] [COLOR=yellow]Me.TableAdapterManager.UpdateAll(Me.PatientDataSet)[/COLOR][/SIZE]
Me.DataGridView1.DataSource = Me.PatientDataSet.DonorStatus.Select("IC='" & Me.ICTextBox.Text & "'")
btnCancel.Text = "Back"
btnSave.Enabled = False
ElseIf btnSave.Text = "Add" Then
Me.DonorStatusBindingSource.EndEdit()
Me.DonorStatusBindingSource.AddNew()
Me.ICTextBox.Text = frmBlood.txtIC.Text()
btnSave.Text = "Save"
btnCancel.Text = "Cancel"
End If
the yellow highlight is the one place that error occur