Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Use ESC To Interrupt a Runaway Query
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows 2000 SP4
Network:
Windows NT
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01003264
Message ID:
01003867
Views:
22
>>oh, how about something like
>>
>> IF USED(srView)
>>   set escape on
>>   REQUERY(srView)
>>   if lastkey()=27
>>      do cleanUpAndStuffForUser
>>   endif
>> ELSE
>>   USE (srView) IN 0
>> ENDIF
>>
>>
>>There is an ON ESCAPE command, but I don't think that would help in this situation.
>
>Raphael,
>
>That works welll enough, almost. In place of the "DO cleanUp.." statement, I am putting a MESSAGEBOX() then the next line just releases the form. However, just before my MESSAGEBOX() comes up, I get the VFP box ****INTERRUPTED****, Ignore, Cancel, and the program code is scrolled across my form. This is a result of SETting ESCape on. How do I prevent this message from happening?

That's what ON ESCAPE command is for. You need to define your own procedure with ON ESCAPE. BTW, this command is not supported in OleDB, but I'm not sure what other alternatives are there.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform