New Posts New Posts RSS Feed: Error during save
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Error during save

 Post Reply Post Reply
Author
amit007 View Drop Down
Newbie
Newbie
Avatar

Joined: 10-Mar-2009
Posts: 10
Post Options Post Options   Quote amit007 Quote  Post ReplyReply Direct Link To This Post Topic: Error during save
    Posted: 15-Apr-2010 at 10:36am
Hello,
I am keep on seeing following exception when saving in silverlight.:
"Store update, insert, or delete statement affected an unexpected number of rows(0). Entities may have been modified or deleted since entities were loaded. Referesh ObjectStateManager entries".
 
This error usually happens if I were to save multiple objects. It saves successfully to database, but when checking for error once the Async save has been completed there is an exception. I also noticed this message when I am the only updating records, so i donít think this would be concurrency issue when though it looks like.   Does anyone know what could be the underlying issue?
 
Thanks,
Amit
 
Back to Top
davidklitzke View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 14-Jun-2007
Posts: 715
Post Options Post Options   Quote davidklitzke Quote  Post ReplyReply Direct Link To This Post Posted: 15-Apr-2010 at 10:55am
Back to Top
amit007 View Drop Down
Newbie
Newbie
Avatar

Joined: 10-Mar-2009
Posts: 10
Post Options Post Options   Quote amit007 Quote  Post ReplyReply Direct Link To This Post Posted: 15-Apr-2010 at 11:29am
All my updates are done via ideaBlade. I am not explicitly attaching or detaching entities, plus all the fields in EntityManager are set to CuncurrencyMode="None". If  I had any of the fields  CuncurrencyMode set to Fixed then this error would have made sense.
Back to Top
davidklitzke View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 14-Jun-2007
Posts: 715
Post Options Post Options   Quote davidklitzke Quote  Post ReplyReply Direct Link To This Post Posted: 16-Apr-2010 at 7:18am
See if you can identify any of the entities causing the concurrency violation:
 
Please see the solution in the Concurrency Conflicts folder in the Learning Resources at

     LearningResources\040_BusObjPersistence\ConcurrencyConflicts
Back to Top
amit007 View Drop Down
Newbie
Newbie
Avatar

Joined: 10-Mar-2009
Posts: 10
Post Options Post Options   Quote amit007 Quote  Post ReplyReply Direct Link To This Post Posted: 21-Apr-2010 at 8:21am

It turns out that if i call saves twice in program within millisecond, i will see the error. Now I am checking if there is already save in progress, then wait for second save to complete.

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down