Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Refreshing forms dataenvironment
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01369257
Message ID:
01369262
Views:
13
>I have a form that can be opened multiple times in an application. Very basic where the form is a private data session. One table (vfp) added in the dataenvironment with buffer (5) Opt. Table buffering.
>
>Each control on the form has a controlsource to a field in the table.
>
>If there are 2 of these forms open at once and happen to be pointed to the same record in the table and From1 has some changes that have been committed to the table with a tableupdate, how can i get Form2 to recognize these changes without going out of form and back into it.
>
>Likewise, if not on the same record and Form2 has a way to move the record pointer to the same record as Form1 (above), it still shows the original value for the controls.

Are you using local/remote views or are you using the table directly?

What I've done in the past (and yes it is a huge pain in the neck) is use views, put timers on the screen to auto-requery the data IF you're form is NOT in "edit-mode" - and then put some code in the activate() method to make sure it requerys the data when the form comes active (again - if not in "edit-mode"). Then, when saving - check to see if the back-end data has changed from what it was orignially - if it has then send message to user so they know they're about to overwrite what someone else just did and display what has changed. At one point I spent a few months writing some really slick class-libs that dealt with all this - I think many of the VFP frameworks deal with this issue too.
ICQ 10556 (ya), 254117
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform