Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
View definition has been changed
Message
De
30/10/2007 18:02:09
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01265020
Message ID:
01265208
Vues:
16
Got it!

As mentioned earlier, the problem arose when I used different settings for a particular logical in subsequent requeries of the same view. Based on the setting of the logical, either an underlying numeric value (from a table) went to the view’s cursor, or a value of 0.00 was sent to the cursor by the view. This happened in the line:
iif(OD.lChg4Add, OD.nCrest_Prc, 0.00) as nCrest_Chg
As it turns out, Surgey had the right concept with his warning about “expressions that could return variable size strings”, as the problem was size (structure). It was Bruce’s approach; however, that pointed directly to the problem.

I ran the view under the two different logical settings for OD.lChg4Add and saw that the structure for nCrest_Chg showed up either as [n 5,2] (which represented the structure of the underlying field OD.nCrest_Prc that was being read), or as [n 4,2] when the SQL provided the value of 0.00.

The solution was the below:
iif(OD.lChg4Add, OD.nCrest_Prc, 00.00) as nCrest_Chg
where I replaced 0.00 with 00.00, which forced the view structure for nCrest_Chg to [n 5,4] ... matching the structure that came from the table.

Thanks to all

Bob
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform