Skip to Content.
Sympa Menu

freetds - Re: [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: Re: [freetds] problem with ntext on sql server
  • Date: Mon, 3 Aug 2009 09:07:03 +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)')
>
> Please see if you can provoke the same problem using bsqlodbc or unixODBC's
> isql utility. Include a TDSDUMP log of the session.
>
> Using TDS 7.0+ is necessary. The log will show what version of TDS you're
> actually using.
>
> If the problem occurs only in pyodbc, most likely you're not really using
> TDS 7.0 or 8.0. Here again the TDSDUMP log is your friend.
>
> I tried to reproduce what you're seeing several different ways. The only
> thing I learned is that bsqldb (for reasons unknown) fails to print the
> output of
>
> select cast('hello' as ntext)
>
> but sqsh and isql were happy.
>
> --jkl


Hi, thanks for the response. I set TDSDUMP and made a connection to
the same database using isql, and it reported that version 4.2 is
actually being used, despite the fact that I have included:

[global]
tds version = 8.0

in /etc/freetds/freetds.conf, /usr/share/freetds/freetds.conf, and
~/.freetds.conf.
These are all the files returned by 'locate freetds.conf' on my
machine (except in the source
and examples folders).

Is this the correct way to specify the version? Is it being
overridden somewhere?
How can I make sure that I connect with version 8.0?

Thanks.




Archive powered by MHonArc 2.6.24.

Top of Page