Hi Peter,
The code I provided allows user to cancel long APPEND by pressing ESC key. ON ESCAPE is used to set llUserCanceled variable so programm would know if APPEND was completed or was canceled by user. It's not used in APPEND FROM command. If it's the way your code works than I've no idea what you're looking for.
>Chuck, Nadya, Sergey,
>
>Thanx. Although...
>According to the documentation, program execution should resume on the line
after APPEND FROM. The result of the ON ESCAPE statement shouldn't even be of influence. However, my experience is that the APPEND FROM simply continues. The only effect that can be arranged is a speedup due to the setting of a variable like llUserCanceled. That same effect was already dealt with in my original code. So, I still don't really have my WHILE effect. There's no problem with small appends, but in my case I have to deal with 10 million record import.
>
>Any other suggestions?
>
>
>>Peter,
>>
>>Of a top of my head
lcSaveOnEscape = ON("ESCAPE")
>>lcSaveSetEscape = SET("ESCAPE")
>>
>>SET ESCAPE ON
>>ON ESCAPE llUserCanceled = .T.
>>llUserCanceled = .F.
>>APPEND FROM ...
>>
>>SET ESCAPE &lcSaveSetEscape
>>ON ESCAPE &lcSaveOnEscape
>>
>>IF llUserCanceled
>> * Process was interrupted by an user.
>>ELSE
>> * Process completed
>>ENDIF
>>>Hi to all,
>>>
>>>Who knows a way to abort an APPEND FROM (delimited with tab)?
>>>
>>>I've tried to use the FOR clause, but it won't abort. Instead, vfp will continue with the remaining source-records. In this case, I need a WHILE clause, but it's not there.
>>>
>>>The SET ESCAPE OFF is not my first thought, since it's an application for endusers.
--sb--