Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to interrupt a SQL Select?
Message
From
10/01/2000 15:27:49
 
 
To
10/01/2000 14:12:03
Jim Davis
Prospect Information Network
Chicago, Illinois, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00315612
Message ID:
00315720
Views:
29
>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.)
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform