StrataFrame Forum

Possible concurrency issue encountered

http://forum.strataframe.net/Topic12248.aspx

By Andria Jensen - 10/29/2007

I get this error message on a BO.Save() call.  Can you give me some additional info as to what could be causing this or what it actually means?   

By StrataFrame Team - 10/30/2007

It means that the business object is trying to save a record that has been saved by someone else recently.  It's used for detecting concurrency issues (when userA and userB both check out a record and modify it and they both try to save it at the same time). 

So, that's normal in a networked application scenario, but if it's happening all the time on one of your business objects, then the UpdateConcurrencyType might need to be changed to Off or OptimisticRowVersion if it's set on OptimisticAllFields.  The exception being throw contains properties that show the row causing the data collision.

By Andria Jensen - 10/30/2007

Ok, I figured it out.  I was trying to delete before the records were finished saving out I think.  I am using a BO to populate a DevEx report, and only want it to actually save to the db under certain circumstances.  So I was deleting in the AfterPrint event, but it looks like it wasn't quite finished with the BO by that time since the report generation is on a different thread.  I put a pause in there before deleting and it works fine now.

Is there a better way to accomplish what I'm trying to do?  I basically need to temporarily store data for a report, and if certain conditions are met save it to the database.  Otherwise, the data should never be saved to the db.

By StrataFrame Team - 10/30/2007

I'm glad you got it figured out Smile