Skip to Content.
Sympa Menu

freetds - Char (null not allowed) and varchar cols empty/MS SQL 6.5

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Rolf Johansson" <rolf.johansson AT ub.gu.se>
  • To: freetds AT franklin.oit.unc.edu
  • Subject: Char (null not allowed) and varchar cols empty/MS SQL 6.5
  • Date: Fri, 17 Aug 2001 10:50:54 -0400


Hello all nice people,

I've installed FreeTDS 0.52 on a Linux box running Debian.
I use it and iODBC to connect to an SQL Server 6.5 on a NT machine.
The TDS version is 4.2.

Everything is ok in odbc.ini and I can connect to different databases
on the NT box. However, I can only get text strings from tables where
columns are of type 'char' and where those columns only are set to
'not null'.

If we try to get varchar fields, the return to the client (in this case
the programming language Pike) is empty. However, in the log file for
FreeTDS I can see that the packet sent from the NT server contains
the correct strings, but for some reason the "convert" statement that
is there for the char fields that I get, are missing. FreeTDS doesn't
convert what is recieved.

Example:

2001-08-17 14:34:17 processing row tokens. marker is d1
2001-08-17 14:34:17 clearing column 0 NULL bit
2001-08-17 14:34:17 converting string dlen = 1024 dtype = 47 string =
107-magasinet. Mercedes...

(above shows up correct)

2001-08-17 14:35:04 processing row tokens. marker is d1
2001-08-17 14:35:04 clearing column 0 NULL bit
2001-08-17 14:35:04 processing row tokens. marker is d1
2001-08-17 14:35:04 clearing column 0 NULL bit

(on varchar cols, no "converting")

Anyone stumbeled across this problem, or can help in any way?
I've tried to search the FAQ and the net for some article about this,
but found nothing appropriate.

Best regards,
Rolf



  • Char (null not allowed) and varchar cols empty/MS SQL 6.5, Rolf Johansson, 08/17/2001

Archive powered by MHonArc 2.6.24.

Top of Page