Issue 135: pyodbc + FreeTDS + SQL Server: null nvarchar causes memory error
Status:  Duplicate
Owner: ----
Closed:  Nov 2010
Reported by s...@mitre.org, Nov 17, 2010
What steps will reproduce the problem?
1. Connect to an SQL Server DB using the FreeTDS ODBC driver. The DB should contain a table which has a column of type nvarchar and a row for which that column is null
2. c.execute("select top 1 <col> from <tbl> where <col> is null"), where <col> is the nvarchar column and <tbl> is the table that contains it.
3. c.fetchone()

What is the expected output? What do you see instead?

The expected output is (None,). Instead, I get a MemoryError (and occasionally, a bus error).

What version of the product are you using? On what operating system?

pyodbc 2.1.8

Please provide any additional information below.

FreeTDS CVS checkout from 11/16/2010
MacOS X 10.6.4
Python 2.6
iODBC driver manager
SQL Server 2008 RTM

Nov 17, 2010
#1 s...@mitre.org
Oops, this is a duplicate of  issue 97 . My apologies. I'll update that issue instead.
Nov 19, 2010
Project Member #2 mkleehammer
As noted, this is a duplicate of  issue 97  (though I haven't checked that).
Status: Duplicate