471,049 Members | 1,924 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,049 software developers and data experts.

Concurrency Violation: the Delete Command Affected 0 records

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
mydefault3 = mydefault3 + 1
End If
----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
Nov 21 '05 #1
1 4419

I am not sure if it helps, however I think you are after the remove wich
removes a datarow, while the delete set only the rowstate to "deleted".


Read the explaining text on this page and than it will hopefully be clear.
Did you know that using long cost more memory (processing) than using
integer. VBnet is optimed for integer.

I hope this helps?

Nov 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Charlie Williams | last post: by
5 posts views Thread by Vayse | last post: by
11 posts views Thread by John | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.