StrataFrame Forum

managing ConcurrencyException

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

By Michel Levy - 7/24/2008

Hi,

I try to manage ConcurrencyException with my own SoftCollision form (wich is nearly a SF SoftCollision form, only localized).

this form is shown from my maintenance form:

Private Sub V_TVA_ConcurrencyException(ByVal e As MicroFour.StrataFrame.Data.ConcurrencyExceptionEventArgs) Handles V_TVA.ConcurrencyException

Dim loFrmConflit As New MLControlesSF.MLSF_SoftCollisionDialog(e)
        If loFrmConflit.ShowDialog(Me.MdiParent) = Windows.Forms.DialogResult.OK Then
...

After closing that loFrmConflit, your SF SoftCollision form is raised! why? Crazy

By Trent L. Taylor - 7/25/2008

You just need to set the AutoHandleCollisions property on the form to False and then only yours will appear.
By Michel Levy - 7/25/2008

Trent,

thanks, thanks a lot!

I've spent hours and hours reading all topics on forums about concurrency exception, reading helpfile, reading your source code... and I have not seen that little property Pinch

so thanks again!

By StrataFrame Team - 7/25/2008

Glad you found that.  When you turn that option off, you'll want to handle the CurrencyException event on the business object or form and all of the information you'll need you'll find in the event args: option to resave the record, the primary key of the row, a list of the columns that don't line up, etc.
By Michel Levy - 7/25/2008

Ben,

I had found all that I needed in the helpfile and on that forum (thanks to all contributors), about this event. And yes, all I want is in the event args, and I manage it with my users requirements.

That was Only AutoHandleCollisions property, ehhmmm.... sometimes, I feel old, old, when I am so stupid!

By Trent L. Taylor - 7/26/2008

That was Only AutoHandleCollisions property, ehhmmm.... sometimes, I feel old, old, when I am so stupid!

You definitely should not feel that way at all!  The framework has a lot of functionality and is very deep...so it is easy to miss a property here orr there!  We have all done it!!! Wink