>Hi all,
>
>I've got an installed application recently upgraded to VFP7 that has kicked out the following error twice:
>
>"fatal error - exception code C0000005"
>
>When I look at the line of the "called from" routine, I find the innocuous line: WAIT WINDOW 'Working on record: '+str(lnCount) TIMEOUT.2
>
>This line was inserted to slow down a loop that was batch processing some records. The whole thing appears to work 99% of the time.
>
>Any ideas what could cause this error intermittently on such a simple line of code?
The command can fail if lnCount is of the wrong type. Separate this into two commands:
local lcMessage
lcMessage = "Working on record: " + str(lnCount)
wait window lcMessage timeout 0.2
Or use trans() instead of str():
wait window "Working on record: " + trans(lnCount) timeout 0.2
Also, why the timeout?
scan
wait window "Working on record: " + trans(lnCount) nowait
endscan
wait clear
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)