Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Code is not functioning
Message
De
08/05/2006 14:38:34
 
 
À
08/05/2006 13:40:33
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 6
OS:
Windows '98
Network:
Windows 98
Database:
Visual FoxPro
Divers
Thread ID:
01120099
Message ID:
01120127
Vues:
16
>>Why the code is not functioning?
>>
>>
>>IF THISFORM.COMBO1.VALUE=ALLTRIM("RAM") OR ALLTRIM("RAHIM")
>>INSERT INTO TESTC(NAME);
>>VALUES(THISFORM.COMBO1.VALUE)
>>ENDIF
>>
>>IF THISFORM.COMBO1.VALUE=ALLTRIM("SHYAM") OR ALLTRIM("JOHN")
>>INSERT INTO TESTC(NAME);
>>VALUES(THISFORM.COMBO1.VALUE)
>>ENDIF
>>
>>
>
>If works with boolean values. ALLTRIM("RAHIM") return value is character.
>If
>THISFORM.COMBO1.VALUE=ALLTRIM("RAM")
>is not true, or would cause second expression to be evaluated and would fail.
>Probably you meant:
>
>if inlist(alltrim(THISFORM.COMBO1.Value),"RAM,RAHIM,SHYAM,JOHN")
>  INSERT INTO TESTC (NAME) VALUES(THISFORM.COMBO1.Value)
>ENDIF
>
Cetin


Don't forget the standard warning about SET EXACT. With SET EXACT OFF values like "RAMA","JOHNNY" become "RAM" and "JOHN" for comparison purposes and could return an incorrect TRUE. That may be OK in the application, but then again................
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform