Collision Form


Author
Message
Michel Levy
Michel Levy
Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)
Group: StrataFrame Users
Posts: 193, Visits: 9K
Still learning StrataFrame...

I can't figure out how to localize the StrataFrame collision form and how I could put it on top

Myform.TopMost = True and Myform.MyBrowseDialog.ForceWindowTopMost = True, so collision form is always on bottom

Replies
StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Is the event being raised and there is nothing in the event args, or is the collision not being detected?  If the collision is not being detected, you can always turn on Debugging for the data source (MicroFour.StrataFrame.Data.DataBasics.DataSources("").SetDebugOn()) and check the command that is being executed to make sure that it would be albe to find the collision.
Michel Levy
Michel Levy
Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)
Group: StrataFrame Users
Posts: 193, Visits: 9K
Thanks Ben,

I begin to understand... here is the SQL command really sent by the BO (concurrency mode set on allfields, so all the additional WHERE clauses are correct):

DELETE FROM [dbo].[cuves] WHERE [cuve_pk] = @cuve_pk AND (([numcuve] = @numcuve_ORG) OR ((@numcuve_ORG IS NULL) AND ([numcuve] IS NULL))) AND (([qtestock] = @qtestock_ORG) OR ((@qtestock_ORG IS NULL) AND ([qtestock] IS NULL))) AND (([volumax] = @volumax_ORG) OR ((@volumax_ORG IS NULL) AND ([volumax] IS NULL))) AND (([dispo] = @dispo_ORG) OR ((@dispo_ORG IS NULL) AND ([dispo] IS NULL))) AND (([directe] = @directe_ORG) OR ((@directe_ORG IS NULL) AND ([directe] IS NULL)));

@volumax_ORG was 10 on A client side when BO was filled, and User B upadated its related field to 100 before A asked for deletion.
So my SQL command would never raise an exception, since there was no line matching on the server!

I totally misunderstood the purpose of DeleteConcurrencyType, wich is only to add the additional where clauses, right?


How could I retrieve the result of the delete command (boolean or #line deleted) without writing a specific procedure?
Or is it a better practice to create a property "is_deletabled" on my BO class, and to check in beforedelete method to switch that property to True or False, so it could be retrieved by beforedelete methode on UI layer?

and the SetDebugOn is really a very nice tool Smile

StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
@volumax_ORG was 10 on A client side when BO was filled, and User B upadated its related field to 100 before A asked for deletion.
So my SQL command would never raise an exception, since there was no line matching on the server!

Hrm.  That is very odd.  The addition of the extra parts to the WHERE clause will prevent the line from being deleted (just like it should), however, it should be raising an concurrency exception.  Looking at the source code, if the local line is deleted, it will raise the ConcurrencyException just like normal. 

Just out of curiosity, are you expecting to wrap the Save() in a Try/Catch or are you handling the ConcurrencyException event of the business object?

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Michel Levy - 18 Years Ago
Trent L. Taylor - 18 Years Ago
Michel Levy - 18 Years Ago
Trent L. Taylor - 18 Years Ago
Michel Levy - 18 Years Ago
                         Sounds good. We look forward to working with you :)
Trent L. Taylor - 18 Years Ago
                             Hi, I'm now creating my own collision form, so I'm working with...
Michel Levy - 18 Years Ago
                                 Is the event being raised and there is nothing in the event args, or...
StrataFrame Team - 18 Years Ago
                                     Thanks Ben, I begin to understand... here is the SQL command really...
Michel Levy - 18 Years Ago
                                         [quote]@volumax_ORG was 10 on A client side when BO was filled, and...
StrataFrame Team - 18 Years Ago
Michel Levy - 18 Years Ago
StrataFrame Team - 18 Years Ago
Michel Levy - 18 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search