My favorites | Sign in
Project Home Downloads Wiki
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 320: pyodbc incorrectly ignores Precision/Scale when inserting Decimal values
2 people starred this issue and may be notified of changes. Back to list
Status:  New
Owner:  ----


 
Reported by jtas...@gmail.com, Apr 30, 2013
What steps will reproduce the problem?
1. Using Firebird SQL Server, create a table with a column of datatype DECIMAL(9,5)
2. The maximum allowed value in a such a column is 21474.83647, or (2^31-1)/(10^5). Now, attempt to INSERT a value larger than the maximum into the column


What is the expected output? What do you see instead?
I expect the error:
#       SQL Message : -802
#        Arithmetic overflow or division by zero has occurred.
But instead, pyodbc inserts the value -21474.8365


What version of the product are you using? On what operating system?
Python 2.7.3 (32 bit)
pyodbc-3.0.6-py2.7
Firebird SQL Server 1.5.6.5026 (32 bit)
Firebird ODBC Driver 2.0.1.152 (32 bit)
Windows 7 Professional x64


Please provide any additional information below.
Attached is a test script illustrating the problem. (pyodbc also can't seem to SELECT the value -21474.8365 properly, but maybe that is a separate issue?)
pyodbc_test.py
1.3 KB   View   Download

Powered by Google Project Hosting