Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Long and\or works in IDE not as EXE
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00723226
Message ID:
00723563
Vues:
9
Hi R,

Tell your coworker to add NOFILTER clause to the SELECT, so VFP'll create cursor as a temp table not as a filtered source table. Remind him/her that there's _TALLY system variable that stores the # of records returned/processed by the last table releted command.
...
into cursor tempsCheck NOFILTER
if _TALLY > 0
	why = "Already Assigned To " +truck_num
	messagebox(why, 16, "E")
	use
	return
endif
BTW, 'CREATE CURSOR ...' command before SELECT is useless because SELECT creates new cursor anyway.


>Hi,
>
>My coworker has an app that in the doubleclick event of a listbox, moves the selected item to another listbox. Running the forms in the IDE everything works as desired. As an EXE on runtime however, doubleclicking always hits the IF bringing up the already assigned messagebox. What is so IDE friendly in this?
>
>TIA
>
>
>
>CREATE CURSOR tempsCheck (driver C(30), helper1 C(30),helper2 C(30), helper3 C(30), helper4 C(30),;
>						  truck_num C(10), dwrk_order C(6),dwrk_sdate	D)
>SELECT presched.driver, presched.helper1, presched.helper2, presched.helper3, presched.helper4,;
>	   presched.truck_num,presched.dwrk_order, presched.dwrk_sdate;
>FROM presched;
>WHERE presched.dwrk_sdate = date() + 1;
>AND alltrim(presched.driver) = alltrim(thisform.list3.value) OR;
> alltrim(presched.helper1) = alltrim(thisform.list3.value) OR;
> alltrim(presched.helper2) = alltrim(thisform.list3.value) OR;
> alltrim(presched.helper3) = alltrim(thisform.list3.value) OR;
> alltrim(presched.helper4) = alltrim(thisform.list3.value);
>ORDER BY presched.dwrk_truck, presched.dwrk_men, presched.dwrk_stime;
>into cursor tempsCheck
>select tempsCheck
>if !eof() and !bof()
>	why = "Already Assigned To " +truck_num
>	messagebox(why, 16, "E")
>	use
>	return
>endif
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform