Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Numeric over flow
Message
 
À
12/12/2007 12:56:09
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01275176
Message ID:
01275180
Vues:
13
>Hi
>when I run scan on cursor for statistics as following , I get the message 'numeric overflow. data was lost' (error 39).
>I get it when I divide value to 0 (For example I have cursor with the columns city, personal (i - count of how many personals in this city), fats (i - count of how many fats there are in this city) and another column is 'onefrom' (i - one from X persons in this city is fat)
> I have to run by scan 'replace cursor.onefrom with cursor.personals/cursor.fats').
>So if unfortunately there are no fats in this city (hypothetical option...), it means that I want to divide number in 0 and I get the message.
>My question is: or how can I voiding the message (If by code I have to fill this code in hunderds places or
>I can tel to vfp ignore this error.) or my system is wrong.
>
>
>help please

You ca suppress that message, but that doesn't mean that you wouldn't have wrong data in your table
So I suggest you to have something like:
replace cursor.onefrom with IIF(cursor.fats==0, 0 (or whatever value you want), cursor.personals/cursor.fats)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform