| Issue 307: | MemoryError on OS X accessing Decimal columns in SQL Server database | |
| 2 people starred this issue and may be notified of changes. | Back to list |
I'm using pyodbc 3.0.6, OS X 10.8, system iODBC, FreeTDS 0.91. Connecting to a SQL Server database, attempting to select a single row in a table that contains a column of type decimal(18,2), containing a NULL in this case. If that column (alone or together with other columns) is included in the query, cursor.fetchone() fails with a MemoryError; if the column is not included, it works. The same issue occurs using the head branch from pyodbc's git.
Oct 9, 2013
I am also encountering this issue.
Nov 13, 2013
I am seeing this issue as well.
Mar 27, 2015
this ever get fixed?
Apr 6, 2015
This is a problem in 3.0.7 and at this time there is no newer release. However, the latest source code fixes this problem. If you're using PIP you can install this like so: sudo pip install 'git+https://github.com/mkleehammer/pyodbc' The latest source is on GitHub and I've recreated issue #35 to track it: https://github.com/mkleehammer/pyodbc/issues/35 Finally, here is a query I used to test this problem: SELECT CAST(NULL AS DECIMAL) If you run this through Pyodbc 3.0.7 it raises a MemoryError exception but it works fine within FreeTDS directly (tested in the tsql command-line tool). |
Labels: OpSys-OSX