Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to NOT stop the Select SQL?
Message
 
 
To
27/01/2005 15:49:13
Mike Yearwood
Toronto, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
00980904
Message ID:
00981500
Views:
52
It actually takes less than 20 seconds for 1 letter search.

>Nadya
>
>If I sat there for 5 minutes and hit escape, and NO, and it restarted at the beginning I'd think that pretty stupid. An advance warning about the escape key would be much better.
>
>>Mike,
>>
>>Thanks. I managed to get it to work, but basically I agree with you. However, I'm now allowing to escape once and answer NO, I pressed this button by mistake. But in this case I'm re-running REQUERY() again. If they hit ESC again and answer NO again, they would have search interrupted. I don't want to program loop here, though it may work as well.
>>
>>>Hi Nadya
>>>
>>>I see no way to make the query continue if the user hits escape. To me the whole point is that the user is tired of waiting and wants to quit. If they hit escape by mistake, they'll have to learn to be more careful. You could put a window behind the progress bar, which advertises the escape key and warns of the consequences.
>>>
>>>>Hi everybody,
>>>>
>>>>I want to be able to stop or not stop query execution if the user pressed an ESC while running query.
>>>>
>>>>First of all, I found that the documentation on Error 1839 is very limited and incorrect.
>>>>
>>>>Here is what I have in my Search button:
>>>>
>>>>SET ESCAPE ON
>>>>		SET NOTIFY ON
>>>>		ON ESCAPE plStop = YesNo("Are you sure you want to stop?")
>>>>		SET TALK WINDOW NOWINDOW
>>>>		SET TALK ON
>>>>		.nRecords = EVALUATE('thisform.obizObj.PopulateCursor('+ ;
>>>>			.cParams +')')
>>>>
>>>>and this is the code from Error method:
>>>>
>>>>LPARAMETERS nError, cMethod, nLine, tcSys16, toErrObj
>>>>IF m.nError = 1839 && Requery cancelled	
>>>>
>>>>	IF VARTYPE(m.plStop) = "L" AND m.plStop
>>>>		* Have we stopped already?
>>>>	ELSE
>>>>		RETRY
>>>>	ENDIF
>>>>ELSE
>>>>	DODEFAULT(nError, cMethod, nLine, tcSys16, toErrObj)
>>>>ENDIF
>>>>
>>>>However, if I say No, I don't want to stop, my view is not required (?spell) again. Is there a way to achieve the desired functionality? I do not see a way.
>>>>
>>>>Thanks in advance.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform