Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with Locate having Three conditions
Message
From
11/07/2002 08:56:59
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
11/07/2002 08:54:40
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00677478
Message ID:
00677482
Views:
24
>>Hello All,
>>I am not getting the desired results when using 'LOCATE' for three or more conditions. Is this a limitation in VFP?
>>Here a sample code.
>>LOCA FOR ALLTRIM(B_NUM) = alltrim(XBNUM) .AND. BETWEEN(STARTTIME,(XSTARTTIME - MTIMEALLOW),(XSTARTTIME + MTIMEALLOW))
>>Any help or alternative will be appreciated.
>>TIA.
>
>That would be two conditions, combined with AND. What is the result you expect, and what do you obtain instead?

The comparison with "=" can give unexpected results, depending on SET EXACT. Better use padr(), to fill with spaces to the exact length of the character field (if it is, indeed, of type character).

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform