chornbeak / pyodbc

Automatically exported from code.google.com/p/pyodbc
MIT No Attribution
0 stars 0 forks source link

MemoryError on OS X accessing Decimal columns in SQL Server database #307

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
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.

Original issue reported on code.google.com by lacerc...@gmail.com on 28 Jan 2013 at 6:12

GoogleCodeExporter commented 8 years ago

Original comment by mkleehammer on 28 Mar 2013 at 10:27

GoogleCodeExporter commented 8 years ago
I am also encountering this issue.

Original comment by gsib...@gmail.com on 9 Oct 2013 at 3:13

GoogleCodeExporter commented 8 years ago
I am seeing this issue as well.

Original comment by pradyut2...@gmail.com on 13 Nov 2013 at 8:59

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
this ever get fixed?

Original comment by mewa...@gmail.com on 27 Mar 2015 at 8:27

GoogleCodeExporter commented 8 years ago
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).

Original comment by ne...@donuts.co on 6 Apr 2015 at 10:36