(Cross posted to Sesame Online Support)
I'd like some more information on multi-user locking, as it's causing me a big headache. On my form, I do a number of lookups in the On Form Load event. For reasons I have yet to determine, these lookups fail to function when accessing a record that is current locked by another user (either the lookups fail or the locking disallows the form fields to be programatically populated). The problem is that I do writes using XResultSetValue during the On Form Exit event. Some of the writes utilize data that was supposed to have been loaded in the On Form Load event. Since the data failed to load, the writes I have in On Form Exit effectively overwrite my data with empty data. Very very bad.
One workaround I tried was to check the locked status of the form's result set. Unfortunately, there was no consistency in the locked status. Sometime it would say the form was locked, and sometime unlocked, with no consistent pattern. The code I used to check the locked status in the On Form Load event was:
If @XResultSetLocked( @XResultSetCurrentForm() ) = 0 Then
WriteLn( "Locked Status = Not Locked" )
Else
WriteLn( "Locked Status = Locked" )
I don't care if my lookups fail, as long as I have some mechanism to use to know to turn off my code in the On Form Exit event. I'd prefer that my lookups succeed, but right now it is much more important that my data doesn't get blown away. Unfortunately, this whole situation is difficult to test, since it can't be tested using the Designer's Preview mode.