Skip to Content.
Sympa Menu

freetds - [freetds] problem with ntext on sql server

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Andrew Magee <amagee AT gmail.com>
  • To: freetds AT lists.ibiblio.org
  • Subject: [freetds] problem with ntext on sql server
  • Date: Fri, 31 Jul 2009 09:51:44 +1000

I've been using pyodbc/freetds to connect to MS SQL Server 2000 and
2005 machines from my Ubuntu linux machine. Everything is fine except
for when I try to select from an ntext field. I get the following
error:

('42000', '[42000] [FreeTDS][SQL Server]Unicode data in a Unicode-only
collation or ntext data cannot be sent to clients using DB-Library
(such as ISQL) orODBC version 3.7 or earlier. (4004)
(SQLExecDirectW)')

The problem seems similar to that described here:
http://stackoverflow.com/questions/947077/using-pyodbc-on-linux-to-insert-unicode-or-utf-8-chars-in-a-nvarchar-mssql-field
, and here:
http://www.zfforums.com/zend-framework-components-13/databases-20/problems-sql-server-ntext-fields-352.html
, although I've tried to set the tds version to 8.0, and set an
encoding, but nothing has yet worked for me.

How can I get querying for ntext to work? Is setting the TDS version
to 8.0 enough? How can I check if the version has been set correctly?
I've tried updating /etc/freetds/freetds.conf,
/usr/share/freetds/freetds.conf, and ~/.freetds.conf, but haven't seen
any changes. I've also tried passing "tdsver=8.0" in the connection
string (not sure if this is even valid), but this also didn't help.

I'm using freetds 0.82-4 as provided by the ubuntu apt repositories.

Thanks for any help.




Archive powered by MHonArc 2.6.24.

Top of Page