Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Wrong Type of Variable
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Visual FoxPro Beta
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
00969940
Message ID:
00970109
Vues:
16
I see You already got your answer, but, wouldn't this work?
local laTotal(1)

laTotal[1] = 0
select SUM(JN6.nJN6_3) ... Into array laTotal

* If there were no records "tallied", laTotal would still be 0

LcMessage = "Amount of it is " + Transform(laTotal[1])
>In this command:
>
>SELECT SUM(JN6.nJN6_3) FROM FORCE JN6, JN5, JN2, JN1 WHERE JN6.nJN6_8 = JN5.nJN5_1 AND ;
>JN5.nJN5_2 = JN2.nJN2_1 AND JN2.nJN2_3 = JN1.nJN1_1 AND JN1.nJN1_1 = LnCurentCompany AND ;
>JN6.nJN6_1 = GnYear AND JN6.nJN6_2 = GnMount INTO ARRAY LaTemp
>LnTotal = IIF(EMPTY(_TALLY), 0, LaTemp(1))
>
>Variable LnTotal have a value as 0 because SUM(JN6.nJN6_3) is 0.
>
>I want to change type of LnTotal from Number to String by STR() function but value of ALLTRIM(STR(LnTotal)) is 0 (No "0") and I can not add it to a string. For example:
>LcMessage = "Amount of it is " + ALLTRIM(STR(LnTotal))
>Value of LcMessage is 0
>But when SET ENGINEBEHAVIOR 80 it works correct! And value of LcMessage is "Amount of it is 0"
>I can not change type of LnTotal and every variables that makes as LnTotal!
>I want to have SET ENGINEBEHAVIOR 90 but I can do this.
>Please help me.
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform