Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Exact Matching Data
Message
From
13/03/2009 11:05:53
 
 
To
13/03/2009 11:00:46
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Novell 6.x
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01387674
Message ID:
01387715
Views:
52
You may use two rules, for simplicity sake
1. SET EXACT ON all times, i.e. set it at the beginning of the application. Naturally, every form with private DS has own SET EXACT OFF, so it should be set correctly too.
2. Use integers instead of characters whenever possible.

>In the example I gave, I would use the alltrim and it still would not work the proper way:
>
>example inlist(alltrim(thisform.myobject),"7",'25","39")
>
>75 would still be OK and I don't want that.
>
>But if the objects total length is 2 digits, I believe what you are saying is if I use "7 " instead of "7" and take out the alltrim, it will only take the 7 instead of anything that begins with 7. (?)
>
>
>>>When comparing data with a condition you have to use the == to get an exact match with characters. It is often nice to use the INLIST function to list multiple values possible in a condition. Say "7", "25", and "39" are possible values and you don't use the ==, then something like "75" would be true even when you don't want it to be. You could write out each condition with the == and be OK, but is there any way to apply the == (exact match) condition while using an INLIST function?
>>
>>Only by using SET EXACT ON setting or by specifing the the values padr(ed) to the exact length of the field.
Edward Pikman
Independent Consultant
Previous
Reply
Map
View

Click here to load this message in the networking platform