Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Long and\or works in IDE not as EXE
Message
 
To
18/11/2002 07:08:39
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00723226
Message ID:
00723927
Views:
9
Thanks Cetin, He ended up restructuring the code to get the desired results. The pointers from Sergey and you helped his direction.

>>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
>
>Matthew,
>Between IDE and EXE I suspect the same data is not used.
>As an addtion to what Sergey said, rework your where clause. It sounds like it's not what you intended. Would be interpreted as :
>
>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);
>
>
>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 ;
>     presched.driver == thisform.list3.value OR;
>     presched.helper1 == thisform.list3.value OR;
>     presched.helper2 == thisform.list3.value OR;
>     presched.helper3 == thisform.list3.value OR;
>     presched.helper4 == thisform.list3.value ;
>   ORDER BY presched.dwrk_truck, presched.dwrk_men, presched.dwrk_stime;
>   into cursor tempsCheck nofilter
>if _Tally > 0
>   why = "Already Assigned To " +truck_num
>   messagebox(why, 16, "E")
>   use in 'tempsCheck'
>   return
>endif
Check where parentheses would go in 'where'.
>Cetin
Opportunity is missed by most people beacuse it is dressed in overalls, and looks like work --- Thomas Edison
Previous
Reply
Map
View

Click here to load this message in the networking platform