Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Multi-User field conflict updates
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00258068
Message ID:
00258142
Views:
12
>>>I am using a page framed multipage form editing data using optomistic row buffering. I am attempting to resolve potential conflicts when other users modify fields durring the current edit session. I want to be able to detect which fields were modified and update the appropriate object on my form. If my object has been edited I wish to inform the user of the potential conflict and allow them to overwrite if they choose. Something like the following.
>>>
>>>FOR lnI = 1 TO FCOUNT()
>>> IF OLDVAL( FIELD(lnI) ) <> CURVAL( FIELD(lnI) )
>>> Compare to My Forms object using lnI somehow
>>> IF MyFormsObject has not Changed
>>> MyFormsObject.Value = CURVAL( FIELD(lnI) )
>>> ELSE
>>> Inform user and let them decide
>>> ENDIF
>>> ENDIF
>>>ENDFOR
>>>
>>>I need help with the MyFormsObject part of the equasion or an alternate method all together.
>>>
>>>Thanks in advance
>>>Terry
>>
>>You can use GetFldState() to see which fields in a record have been changed.
>Yes but what I am after primarily is a way in a for next loop to referance the control objects as they relate to the fields I am looking at.
>I don't want to have to refer to each and every object ( there are about 100+ ) by hand. Also, I don't want to put them in by hand because if I change one thing on the form it will mess things all up and that = BAD PROGRAMMING PRACTICE.
>
>Terry

You can use the GetFldState() to find the fields that have changed. Then you can loop through the controls on your pageframe and check to see which objects have the field set as their controlsource.
Tim Westmoreland
Software Engineer
Skyline Technologies, Inc.

"Upper classes are a nation's past; the middle class is its future." - Ayn Rand, Russian-born author (1905-1982).
Previous
Reply
Map
View

Click here to load this message in the networking platform