Re: problem with ntext on sql server

[email protected]
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
On Fri, Jul 31, 2009 at 09:51:44AM +1000, Andrew Magee wrote:
> 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
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.