Re: 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)')
>
> 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.
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.