Logo 
Search:

Asp.net Forum

Ask Question   UnAnswered
Home » Forum » Asp.net       RSS Feeds

Concurrency violation: the UpdateCommand affected 0 records

  Asked By: Grant    Date: Dec 14    Category: Asp.net    Views: 1185
  

Details: System.Data.DBConcurrencyException: Concurrency violation: the UpdateCommand affected 0 records.

What does this mean? Why would it be a problem if the command doesn’t update any records in this case.

Here is the relevant code :



Sub checkwhattosend

' This section checks if the time before starting has reached zero and if the frequency of sending corresponds with the count

'of how long since the last send (times)

if start_date<>0 then

start()

end if

if start_date<>0 then

return

end if

if frequency=times then

response.write("time to send for" & person)

end if

If times>=frequency then

times=0

end if

ds.Tables("chasers").Rows(I)("times")=times

sqltimes3="Update chasers set times='" & times & "' where emailaddress='" & emailaddress & "'"

dim objCmd3 as new OleDBDataAdapter(sqltimes3,objConn)

objCmd3.UpdateCommand= new OledbCommand

objCmd3.UpdateCommand.CommandText=sqltimes3

objCmd3.UpdateCommand.Connection=ObjConn

objCmd3.Update(ds,"chasers")

send()



end sub

Share: 

 

No Answers Found. Be the First, To Post Answer.