Group: StrataFrame Users
Posts: 70,
Visits: 3.5K
|
Attached is a ConcurrencyBugSample solution that demonstrates the bug. The solution uses the SF Sample Database and the Customers table. I intentionally created this very basic solution with no whistles and bells. It is not pretty, but it demonstrates the bug. You will notice that the only business object properties that are set to non default values are the DeleteConcurrencyType property and the UpdateConcurrencyType property which are both set to OptimisticRowVersion because I want users to be warned by a StrateFrame Data Collision dialog when they attempt to delete or save a record that another user has changed and saved first. And of course the RowVersionOrTimestampColumn property is set to cust_Version which is the name of the rowversion column in the Customers table. Also notice that the solution uses the default StrataFrame method of deleting records from the backend database table one at a time as soon as the user clicks the Delete button on the maintenance form toolstrip not when the user clicks the Save button.
Too see the problem, just open two separate copies of the Customer maintenance form displaying the same record from the backend Database table. In the first form, edit the customer's name and save the record. Then in the second form, delete the same record that the first form just edited and saved. At this point, the second form should display a Data Collision dialog because the save that occurred on the first form caused the cust_Version field to be incremented which then caused the second form's delete to fail. However, no Data Collision dialog appears. The local internal data table record is deleted but the backend database table record is not deleted. This can be proven by launching another copy of the Customer maintenance form and you will see the very record that the second form tried to delete.
In version 1.7.3.1 of the StrataFrame file named businesslayer.vb at line 2442 you will see the call from the business layer to the data layer requesting deletion of the record. After returning from that call to the data layer, the count (lnReturn) of how many records were affected is 0 which is correct because the record should not be and was not deleted because of the concurrency conflict which unfortunately was never displayed. Even though the correct value for lnReturn is returned, the StrataFrame code never tests that value to determine if the deletion of the database table record succeeded.
Please let me know if you have successfully demonstrated the bug because I would sure like to get this problem fixed before the next release of the framework.
Sam Tenney
|