Hi Elyse,
Time for some good old-fashioned code:
Eliminate buffering on the tables. Within the SCAN:
SCAN
IF RLOCK()
REPLACE field WITH data
UNLOCK
ELSE
=MESSAGEBOX("Crap. Can't lock",16,"Replacing")
ENDIF
ENDSCAN
This is the simplest answer. There are other more complicated ways using RLOCK() but this should work for the most part.
>I have some code that SCANs a large number of records in a table and does some stuff with each record, including a REPLACE. On particularly large tables where a lot of records are processed, the server is giving a message that the record lock threshhold has been exceeded and the computer freezes up. Shouldn't the REPLACE command lock and unlock the records automatically? Why would a series of REPLACES cause a problem?
>
>Thanks.
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05