Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Numeric Field precision / digits oddity???
Message
 
 
À
19/11/2012 13:34:57
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Database:
Visual FoxPro
Divers
Thread ID:
01557585
Message ID:
01557593
Vues:
48
No

>Is there any flag to turn this off?
>
>
>
>>It's backwards compatibility for you :)
>>This behavior comes from dark days of Foxbase or even Dbase II.
>>
>>>I have a field in a table that is defined as N(5,1), which would normally allow values like 100.0, with a maximum value of 999.9
>>>
>>>However, I have discovered some rows in my table where the values are these values: 1000, 1500, and even 5000 (notice how all 4 digits are used before the decimal.)
>>>
>>>I was a surprised to see values this high in a few fields, as I thought VFP would not even accept these values, as they are not in compliance with the field definition, although I can understand that with some liberal use of the field size, there is enough room to store these larger values. However, it seems kind of sloppy for VFP to allow this.
>>>
>>>BTW - in a Browse window I cannot enter such a large value in that field, yet from the Command window, I can say
>>>
>>>
>>>REPLACE <field> WITH 1000
>>>
>>>
>>>and it will accept the larger value.
>>>
>>>I know that in my code this field value is set by a REPLACE command in my processing logic, so I can easily understand how/why I have some values this large in my table.
>>>
>>>Either way, I'm still surprised that VFP will accept the value.
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform