Skip to Content.
Sympa Menu

freetds - [freetds] Problems with nvarchar

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Johnny Ljunggren <johnny AT navtek.no>
  • To: freetds AT lists.ibiblio.org
  • Subject: [freetds] Problems with nvarchar
  • Date: Mon, 12 May 2003 17:48:04 +0200


I have this system:
MS SQL 2000 sp2, freetds-0.62.dev.20030508, unixODBC-2.2.5

I have made a small test database on the SQL-server:
DB name: JCTest
One table with name: text
One column with name: textcol
Datatype and length: nvarchar 20

One entry in the table:
textcol = 'Excellent test'

If I run the isql-program that comes with unixODBC, I connect OK and try
this statement:
select * from text;
That should return 'Excellent test' but return this:
+---------------------+
| text |
+---------------------+
| |
+---------------------+
1 rows affected
1 rows returned

If I enter the same statement again I get this:
[unixODBC]Changed database context to 'JCTest'.
[unixODBC]Changed language setting to us_english.
[unixODBC]Option not supported
[ISQL]ERROR: Could not SQLExecute

If I change data type to 'char' or length to i.e. 50 then suddenly
everything works as it should.

How is this possible? What do I do wrong?

I'm fairly new to this, so I'm not sure if it's the fault of me, FreeTDS
or unixODBC. Any pointers to fixing this problem will be greatly
appreciated.

--
Johnny Ljunggren, Priv: Bærefjellvn 15, 3160 STOKKE
Tlf: 33 07 10 77 (jobb) 918 50 411 (mob) 33 33 62 52 (priv)




Archive powered by MHonArc 2.6.24.

Top of Page