Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to NOT stop the Select SQL?
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
How to NOT stop the Select SQL?
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Divers
Thread ID:
00980904
Message ID:
00980904
Vues:
110
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform