Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Eureka! How to ensure updates are seen by all....
Message
From
09/12/1997 14:50:19
Larry Long
ProgRes (Programming Resources)
Georgia, United States
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Eureka! How to ensure updates are seen by all....
Miscellaneous
Thread ID:
00064750
Message ID:
00064750
Views:
65
FYI

I have seen several postings over the last year and have personally had problems in multi-user environments ensuring that data (new or updated records) being posted at one workstation is available at other workstations. The information does eventually get seen by the other workstations. But in a real-time environment, more often than not, problems of this nature do arise.

In the past I have tried using the FLUSH command at the data entry/update workstation, and the SET REFRESH command at the other workstations (and even closing and re-opening the tables) with no consistent results.

The solution is to issue the FLOCK() command! I then am assured that I have all the current table information available to me. The actual code that I use is...

DO WHILE NOT FLOCK()
ENDDO
UNLOCK

This seems to bypass any buffering that the workstation or network has, and forces a read directly from the table.

I hope that this helps to pull a multi-user thorn that has been in developers' sides (at least mine) for quite some time.

//:^)
L.A.Long
ProgRes
lalong1@charter.net
Next
Reply
Map
View

Click here to load this message in the networking platform