problem with ntext on sql server

Andrew Magee <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.