Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Logical field = expression?
Message
 
À
19/07/2007 15:19:27
Jill Derickson
Software Specialties
Saipan, CNMI
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01242108
Message ID:
01242112
Vues:
11
>I'm curious why the following give me an "Operator/operand type mismatch" error:
>
>cse_closed="CLOSED"$UPPER(currentCaseStatus)
>
>cse_closed is a logical field in the currently selected table.
>currentCaseStatus is a character field in the currently selected table.
>
>
>AND:
>
>"CLOSED"$UPPER(currentCaseStatus)=cse_closed
>
>does NOT give me an error, but returns a logical value.
>
>Thanks, J
Because you can't assign a value to a field with [=] you must REPLACE it.

This should work
IF cse_closed = "CLOSED"$UPPER(currentCaseStatus)
   ...
This sholld also:
lbTest = (cse_closed = "CLOSED"$UPPER(currentCaseStatus))
And this:
REPLACE cse_closed WITH "CLOSED"$UPPER(currentCaseStatus)
UPDATE: After I made tests Sergey gave you the right answer.
Damn. I always think that both parts of the equation are evaluated first and then they are compared.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform