Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decimal columns with NULL value cause MemoryError exception #35

Closed
neilobremski opened this issue Apr 6, 2015 · 4 comments
Closed

Decimal columns with NULL value cause MemoryError exception #35

neilobremski opened this issue Apr 6, 2015 · 4 comments

Comments

@neilobremski
Copy link

This query when executed against a SQL Server in Pyodbc 3.0.7 on Mac OS X using iODBC will raise a MemoryError:

SELECT CAST(NULL AS DECIMAL)

There is no issue when tried directly in FreeTDS directly via tsql (0.91).

(UPDATED: Added version, Mac OS X and iODBC to description.)

@keitherskine
Copy link
Collaborator

I'm not seeing that error. I'm running that query against SQL Server 2008 R2 SP3 using pyodbc 3.0.7 and Python 3.4, from both my Windows 7 PC and a Centos 6.5 box using the Microsoft Linux driver (with unixODBC). In both cases I get (None, )

@neilobremski
Copy link
Author

This is a Mac OS X issue, possibly related to iODBC. I should have specified that in the description.

I also just found that the latest source version does not have this issue! That is good news for https://code.google.com/p/pyodbc/issues/detail?id=307 ... I will give some guidance there.

When is the next release due?

@keitherskine
Copy link
Collaborator

Just FYI @neilobremski , in case you don't already know, pyodbc 3.0.8 was released a couple of days ago.

@mkleehammer
Copy link
Owner

If I understand correctly, this is fixed in the latest code. I just released 3.0.10 to consolidate the decimal and int fixes. Therefore I'm going to close this. Reopen if I misunderstood.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants