>Does anyone know how to clear whatever buffer aerror() is reading? I want to trap an error at a specific place and get the info with aerror(), but if there was an earlier error generated somewhere, I can't test for it anywhere later since aerror() will fill an array with the previous error info.
>
>Gary
You can put it to a certain value, with the ERROR command.
However, I never saw the need to do this. I only tested aerror() if an error occured - not if the array had error information.
For instance:
if not TableUpdate()
aerror(MyErrorArray)
MessageBox(trans(MyErrorArray(1)) + " - " + MyErrorArray(2))
endif
Or:
on error llError = .T.
on error
if llError
aerror(MyErrorArray)
...
endif
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)