Hi Mike,
>Is it possible there is code in a timer control that is changing the workarea?
A vfp-timer shouldn't fire during vfp code execution.
"Interrupting" operations should only be possible by c++ timers
or callback functions.
>What is the alias() when the error occurs?
The alias() should be customer,
but perhaps another table was opened with that alias.
Checking like:
if fsize("clientnr") > 0
Locate for clientnr=5
else
StrToFile(alias() + ":" + dbf(), "MyProt")
endif
might help if there is no errorhandler giving this info.
>SEEK is faster than LOCATE and continues to be fast as the number of records grows.
On tables with very few records locate without index will beat seek().
On the first run on tables with many records seek() will probably always be faster.
>IMO LOCATE is better for more complex conditions and for processing sets of records.
Here I believe that locate
might get faster if called again:
AFAIK Seek will traverse the .cdx every time, while locate will reuse already found
optimizing info. So for
some readonly scenarios it might actually become
faster than seek().
my 0.02 EUR
thomas