>>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.
>>
>>//:^)
>
>what happens if i lock a record and go home for the day?
You don't do that. The line after the loop unlocks the record.
Joe
Joseph C. Kempel
Systems Analyst/Programmer
JNC