[freetds] Connection to SQL2000 - Unicode data in a Unicode-only collation

Christos Zoulas christos at zoulas.com
Wed Sep 21 08:28:54 EDT 2005


On Sep 21,  6:44pm, wilson.mak at digitalview.com (Wilson Mak) wrote:
-- Subject: [freetds] Connection to SQL2000 - Unicode data in a Unicode-only 

| Hi all,
| 
| I want to connect to a SQL2000 server, however, during the connection, I 
| got an error as below:
| 
| # tsql -S 10.1.0.200:1433 -U sa -I /etc/freetds.conf
| locale is "en_US.UTF-8"
| locale charset is "UTF-8"
| Password:
| 1> use TEST
| 2> go
| 1> select * from ITEM
| 2> go
| Msg 4004, Level 16, State 1, Server SQLSERVER, Line 1
| Unicode data in a Unicode-only collation or ntext data cannot be sent to 
| clients using DB-Library (such as ISQL) or ODBC version 3.7 or earlier.
| 1>
| 
| Here is the freedts.conf:
| 
| [SQLSERVER]
| host                    = 10.1.0.200
| port                    = 1433
| tds version             = 7.0
| try server logins       = yes
| client charset          = UTF-8
| 
| What other stuffs do i need to set to make it work?
| P.S I can broswe some tables! Weird!

Try setting tds version to 8.0 which is the right one for MSSQL2K. But I
believe that 7.0 should work too, since MSSQL7 had support for
n{char,varchar,text}. Maybe we should change our login packet to tell
MSSQL that we support Unicode even with tds 7.0?

christos


More information about the FreeTDS mailing list