Code like the replace x with x is required to ensure that you see the latest value from other sessions. It's really a VFP issue to ensure that you're getting the latest data from a table/cursor that isn't cached by VFP. I know of no other way for VFP to forceably refresh its buffers short of running a really short SET REFRESH TO value which will bring your app to a crawl. This is important for async AJAX calls, iFrame/Frames content etc that might be happening in multiple sessions 'simultaneously'.
I run with SET REPROCESS TO 2 SECONDS and haven't seen any issues with that but I don't think that's the issue here. The issue is that you have many clients updating the session table simultaneously I'm guessing. It's pretty hard to make happen I'd think unless you have bunch of instances running possibly across several machines. How many instances?
The right solution for this might be to use SQL Server sessions instead of VFP for this...
+++ Rick ---
from Maui, Hawaii