>>The temp files that VFP creates are being scanned and have a significant effect on performance.
IME temp files *must* go in a different location from %TEMP%, because %TEMP% is where payloads often turn up and many customers insist on scanning it. Then your app's temp file folder needs to be excluded from scanning without fail. It's no longer enough to exclude dbf/cdx etc as used to be recommended: under load or on a modern server, a virus scanner can cause unrecognizable access errors to files that don't match the dbf() of the cursor you're trying to access. There's some sort of fleeting VFP internal file that contributes to an intermittent error like this- I think because the error only manifests if the cursor spools to disk. You could try messing with MEMLIMIT to see if that changes the frequency (of cursors spooling to disk) though VFP seems to dance to its own tune regardless.
"... They ne'er cared for us
yet: suffer us to famish, and their store-houses
crammed with grain; make edicts for usury, to
support usurers; repeal daily any wholesome act
established against the rich, and provide more
piercing statutes daily, to chain up and restrain
the poor. If the wars eat us not up, they will; and
there's all the love they bear us."
-- Shakespeare: Coriolanus, Act 1, scene 1