Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Check for empty field
Message
 
À
11/12/2000 21:16:30
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00451997
Message ID:
00452114
Vues:
21
>In a form, I have the formula to check a field X of a table --- if X = "" ...
>It works fine when I run the form in VFP. But it has wrong operant error after I complie it to an exe file.
>Finally I change it to if empty(X) ... then it works fine in both VFP and in its exe file. Does it mean we should use the empty() instead of = "" if we want to check empty field?

See the command SET EXACT.
Depending on SET EXACT the results they are different.

Example:
lc = "    "
SET EXACT OFF
? "" = lc
  >>> .F.
? EMPTY(lc)
  >>> .T.
SET EXACT ON
? "" = lc
  >>> .T.
? EMPTY(lc)
  >>> .T.
I advise to you to use EMPTY()
Luis María Guayán
Tucumán, Argentina
________________________________
SysOp de www.PortalFox.com
Nada corre como un zorro
________________________________
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform