Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do I know if SELECT... finished if ESCAPEd?
Message
 
À
08/08/1997 16:13:27
Larry Long
ProgRes (Programming Resources)
Georgie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00043773
Message ID:
00044571
Vues:
27
I'm not 100% sure but I don't believe you can escape out of a SELECT. If [Esc] is presses during the SELECT I believe FoxPro waits until it's fininshed to process your ON ESCAPE CODE. One thing you might want to check instead of RECCOUNT is _TALLY to see how many records the SELECT returned.

>Have you tried using..."IF LASTKEY()=27..."?
>
>>I have a built-up command as follows:
>>
>>cCommand = 'SELECT * FROM WHERE'
>>cCommand = cCommand + ' THIS_TEST '
>>cCommand = cCommand + ' THAT_TEST '
>>cCommand = cCommand + ' INTO CURSOR MyCursor'
>>
>>Then I run it using &cCommand But I allow the user to ESCAPE out of the process if they wish. How do I know if the SELECT statement finished or if it was aborted? I don't know beforehand, how many records to expect so I cannot test reccount(), is there another way?
>>
>>I've used ON ESCAPE DO CancelSQL, then set a flag in CancelSQL but this requires a seperate procedure file. I was hoping to simply test a system variable or something like that.
>>
>>Thanks in advance
Colin Magee
Team Leader, Systems Development
Metroland Media Group Ltd.
Mississauga, Ontario, Canada

cmagee@metroland.com

Never mistake having a career with having a life.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform