Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
One or more IF statements?
Message
 
 
À
30/07/2008 12:48:47
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Database:
Visual FoxPro
Divers
Thread ID:
01335285
Message ID:
01335294
Vues:
13
Hi Beth,

Maybe I'm missing something, but isn't poGraph.cursor2 populated only when lnButton = 5, which makes check for the button redundand? Also, the second part of conditions will be evaluated only when poGraph.cursor2 is not NULL.
Simple test
poGraph = NEWOBJECT("Empty")
ADDPROPERTY(poGraph, "cursor2", NULL)
? (ISNULL(poGraph.cursor2) OR RECCOUNT(poGraph.cursor2) = 0)  && .T.
*
poGraph.cursor2 = .F.
? (ISNULL(poGraph.cursor2) OR RECCOUNT(poGraph.cursor2) = 0)  && Error
What is the value of poGraph.cursor2 when it's not popualted with a cursor name?

> That still does not work. I still get error 17, because it is looking at RECCOUNT(poGraph.cursor2) = 0.
>I have to look at three things for this set of statements within the IF to work:
>1. poGraph.cursor2 needs to be not set to a cursor name.
>2. lnButton needs to be 5 - they picked the 2 graph report
>3. if lnButton is 5, is there any records in the cursor.
>
>
>>Try
>>IF (ISNULL(poGraph.cursor2) OR RECCOUNT(poGraph.cursor2) = 0)
>>
>>BTW, VARTYPE() returns 'X' for NULL value.
>>
>>
>>>
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform