Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Escape Append From
Message
 
 
À
07/04/2003 19:06:50
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00774905
Message ID:
00774959
Vues:
12
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")		&& Save previous ON ESCAPE setting
>>lcSaveSetEscape = SET("ESCAPE")		&& Save previous SET ESCAPE setting
>>
>>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--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform