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 351: selecting NULL from a NUMERIC column produces MemoryError
2 people starred this issue and may be notified of changes. Back to list
Status:  New
Owner:  ----


 
Reported by zzz...@gmail.com, Dec 28, 2013
test case and ODBC log is attached.  

Client Platform: OSX Maverick
Database: SQL Server 2008
FreeTDS version: 0.82  (can't run 0.91 on OSX due to #247 and other observed quirks that I haven't filed bug reports for)
PyODBC version: 3.0.7-beta10

import pyodbc

conn = pyodbc.connect(dsn="ms_2005", user="scott", password="tiger")

cursor = conn.cursor()

cursor.execute("""
CREATE TABLE t (
    x NUMERIC(8, 4) NULL
)
""")

cursor.execute("""
    INSERT INTO t (x) VALUES (?)
""", None)

cursor.execute("""
    SELECT x FROM t
""")
cursor.fetchall()


output:

classic$ python test.py
Traceback (most recent call last):
  File "test.py", line 20, in <module>
    cursor.fetchall()
MemoryError

pyodbc_null_numeric_odbc.log
17.4 KB   View   Download
Dec 28, 2013
#1 zzz...@gmail.com
here's the freetds log also.
pyodbc_null_numeric_freetds.log
172 KB   View   Download
Dec 28, 2013
#2 zzz...@gmail.com
same error using FreeTDS 0.91
Jun 6, 2014
#3 d...@inlet.geol.sc.edu
I'm seeing the same thing as well.
FreeTDS 0.91, unixodbc 2.3.2, pyodbc 3.0.7 and python 2.7.1 
Jun 6, 2014
#4 d...@inlet.geol.sc.edu
Forgot to add, OS = OS X 10.7.5

Powered by Google Project Hosting