Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Variable oExp.ErrorNo not found ?
Message
De
05/10/2012 16:59:22
James Blackburn
Qualty Design Systems, Inc.
Kuna, Idaho, États-Unis
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Divers
Thread ID:
01554398
Message ID:
01554427
Vues:
55
vartype() can error if the variable does not exists. Better to use type()

if type("loExp") = O' and type("loExp.ErrorNo") = 'N'


>>I did
>>
>>Got the same error.
>>
>>
>>
>What do you mean?
>
>If you added
>
>if vartype(loExp) = 'O' and vartype(loExp.ErrorNo) = 'N'
> if loExp.ErrorNo -- still an error?
>
>
>>>Well, I don't know what is wrong here, but add the logic I suggested you earlier before the IF.
>>>
>>>>And got exactly what I was expecting - same error
>>>>
>>>>
>>>>>Out of desperation try
>>>>>
>>>>>local loExp as Exception
>>>>>
>>>>>and use loExp instead of oExp.
>>>>>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform