What steps will reproduce the problem? 1. Create NVARCHAR (or NTEXT) column in MSSQL 2005 Express database table. create table test_nvarchar (id int identity, nvarchar_col nvarchar(10))
-- Insert capital U with double acute. insert into test_nvarchar values (N'Ű') 2. Run this python script on RedHat 9:
import pyodbc cnxn = pyodbc.connect("DSN=SQLSERVER_SAMPLE") cursor = cnxn.cursor() cursor.execute("select * from test_nvarchar where id = 1") for row in cursor: print row.nvarchar_col print repr(row.nvarchar_col
What is the expected output? Ű u'\u0170 '
What do you see instead?
u''
What version of the product are you using? On what operating system? redhat 9 pyodbc 2.1.2 python 2.5.1 (UCS-2 build) Easysoft SQL Server ODBC driver 1.1.4 SQL Server 2005 Express
Please provide any additional information below. The script works as expected with the same setup if pyodbc 2.0.58 is used or a "hybrid" 2.1.2 built with the 2.0.58 getdata.cpp.
Comment #1
Posted on Dec 12, 2008 by Grumpy GiraffeOK, this is something wierd. It works on Windows just fine, so there is something about the combination of Easysoft and Linux.
Is it possible to get an ODBC trace of the 2.1.2 that fails and the 2.0.58 that works so I can compare them?
Comment #2
Posted on Dec 15, 2008 by Grumpy OxPlease find attached.
- unixodbc.zip 6.38KB
Comment #3
Posted on Mar 18, 2009 by Grumpy GiraffeI'm not ignoring this, but I have not been able to get my Linux system to connect to my test SQL Server instance. Networking issues w/ Vista & Windows 7. sigh.
The traces looked nearly identical, so it is clearly something in the GetDataString function. Unfortunately the newer function is more correct. I'm concerned there is a problem with the driver.
Comment #4
Posted on Aug 28, 2009 by Quick KangarooI'm using - pyodbx-2.1.6 - unixODBC 2.2.12 - python2.6 on a Red Hat Enterprise (32) to talk to SQL Server 2005.
I just want to comment that I think you are right that this is a driver problem. I initially tested pyodbc using Easysoft SQL Server ODBC driver 1.1.4 and had the same problem with Tim. Since I don't want to pay for the license ($$$$$), I ended up installing FreeTDS 0.82 and found that the problem goes away. Configuration was definitely harder for FreeTDS but the result is awesome. Hail to pyodbc and FreeTDS.
Comment #5
Posted on Jan 1, 2010 by Grumpy Giraffe(No comment was entered for this change.)
Comment #6
Posted on Nov 21, 2010 by Grumpy Giraffe(No comment was entered for this change.)
Status: NoFix
Labels:
Type-Defect
Priority-Medium