Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Exact Matching Data
Message
De
13/03/2009 11:05:53
 
 
À
13/03/2009 11:00:46
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Novell 6.x
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01387674
Message ID:
01387715
Vues:
51
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform