DecimalField and SQL Server
Hello all,
-- I have a strange occurrence I'd like to share to see if any of you have run into the same thing. I am using Django 1.5.4, SQL Server 2008, and have the following field definition in one of my models:
gift_value = models.DecimalField(max_digits=20, decimal_places=2, verbose_name='Gift Value')
SQL Server table has the field's dataType as numeric(20,2).
In my form if I enter the following values:
444444444444444444 is saved as 444444444444444416
222222222222222222 is saved as 222222222222222208
666666666666666666 is saved as 666666666666666624
Well you get the picture, no need for me to bore you with more examples. Have any of you see this happen before?
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAPTNyz4gdMxCdAPW0A-Djd2ovugFLoYpQL6M0h1XLewdf0RwfQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home