I'm hoping someone can assist, I have an ASP.Net project, which has started throwing up a concurrency violation and I cannot find anyway of fixing it!
When saving new rows it works absolutely fine, it's when an existing row is amended it throws the error. The code below is where it is happening.
Friend Sub UpdatePlanner(ByRef DisplaySaveCompleteMessage As Boolean, ByRef WriteSequenceToTable As Boolean)
If WriteSequenceToTable Then Seqence()
Dim ChangesTable As DataTable = dtPlannedItems2.GetChanges
If Not ChangesTable Is Nothing Then
Try
builder.GetUpdateCommand()
BoundadptSQL.Update(ChangesTable)
If DisplaySaveCompleteMessage Then
Me.CloseProcessing()
System.Threading.Thread.Sleep(200)
MsgBox("Planned data saved successfully.")
End If
Catch ex As Exception
Me.CloseProcessing()
System.Threading.Thread.Sleep(200)
MsgBox("There was an error saving the plan data!" & vbCrLf & ex.Message & vbCrLf & Err.Description, MsgBoxStyle.Exclamation)
End Try
dtPlannedItems2.AcceptChanges()
End If
Me.CloseProcessing()
End Sub
Any support would be greatly received.