Re: DecimalField and SQL Server

2013-12-08 Thread Derrick Jackson
Tom, Thanks for the quick response and explanation. Using adodbapi is not an option in the environment we run in, but I am checking with the django_pyodbc developers to see why decimal values are converted to float prior to saving to the database. On Sunday, December 8, 2013 11:16:56 AM UTC-

Re: DecimalField and SQL Server

2013-12-08 Thread Tom Lockhart
On 2013-12-08, at 7:18 AM, Derrick Jackson wrote: > Thanks Vernon and Michael. > > I've done a little more research and at first I thought the problem was in > django_pyodbc. However, running the following "%0.2f" % 3 > from the python console and it yields '2

Re: DecimalField and SQL Server

2013-12-08 Thread Derrick Jackson
Thanks Vernon and Michael. I've done a little more research and at first I thought the problem was in django_pyodbc. However, running the following "%0.2f" % 3 from the python console and it yields '2.00' and I don't understand why the digit prior to the decimal

Re: DecimalField and SQL Server

2013-12-06 Thread Vernon D. Cole
Derrick: I just added your failing test pattern to the unit test for adodbapi, and it works correctly. Therefore I would conclude that the problem is in django-pyodbc, not in SQL Server itself. Micheal and I maintain the other SQL server backend, sqlserver_ado, so I am afraid that we can't be

Re: DecimalField and SQL Server

2013-12-06 Thread Derrick Jackson
Hi Michael, I'm using django-pyodbc 0.10 On Friday, December 6, 2013 8:42:00 AM UTC-5, Michael Manfre wrote: > > Which database backend are you using to connect to SQL Server? > > Regards, > Michael Manfre > > On Friday, December 6, 2013 6:45:30 AM UTC-5, Derrick Jackson wrote: >> >> Hello all, >

Re: DecimalField and SQL Server

2013-12-06 Thread Michael Manfre
Which database backend are you using to connect to SQL Server? Regards, Michael Manfre On Friday, December 6, 2013 6:45:30 AM UTC-5, Derrick Jackson wrote: > > 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

DecimalField and SQL Server

2013-12-06 Thread Derrick Jackson
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