Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to interrupt a SQL Select?
Message
De
10/01/2000 16:20:18
 
 
À
10/01/2000 15:27:49
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00315612
Message ID:
00315770
Vues:
36
>>I've tried a few different ON ESCAPE possibilities - nothing, running some routine that displays a MESSAGEBOX, etc.
>>
>>The only way I've been able to escape out of the SELECT is by doing something I read about on UT, by incorporating some code in the WHERE clause that called a function that incorporated a DOEVENTS, but that slowed the SELECT to a crawl, so that doesn't seem to be an acceptable way to do it.
>>
>>If I understand, in theory it _is_ possible to escape from a SELECT that is running in a program?
>
>Yes, but as noted, you need to force VFP to respond to keyboard events within the context of a single statement. In a vast oversimplification of what's going on, VFP responds to events between statements in the program; including a UDF in the Select statement with a DOEVENTS will reliably provide an interrupt mechanism (in the phase that the UDF is being evaluated on; if you put the UDF in the WHERE clause, it would not ever be executed if you got past the WHERE and started executing a HAVING clause, which runs only after the selection/joinign/grouping takes place.)
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform