What I am trying to do is wipe information from a number of tables after
submission to a SQL server database. Of the 6 tables I am trying to wipe I
have had no issues with 5 of them. Multiple entries can be made and they
are then deleted. For one of the tables though, I keep getting the error
Concurrency Violation: the deleted command affected 0 records. the code is
as follows.
Dim myindex3 as Short
Dim mydefault3 as Integer
mydefault3 = 0
myindex3 = DataSet51.evidence.Rows.Count
If myindex3 <> 0 Then
Do Until mydefault3 = myindex3
Dataset51.evidence.Rows(mydefault3).Delete()
mydefault3 = mydefault3 + 1
Loop
End If
OleDbDataAdapter1.Update(Dataset51)
----this is where the error is thrown
We also checked to make sure that the fill command on page load is filling
the dataset51 correctly and that is indeed the case, since we print out the
value to the screen and can see that the count is functioning properly.
Any help on this matter would be very much appreciated.
--
Message posted via http://www.dotnetmonster.com