freetds silently truncating text/varchar/etc fields to 80 characters

"James K. Lowden" <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
Federico Alves wrote:
> I have the same issue win SQL 2008 and tds version=8.0.  I cannot
> retrieve a column whose varchar(length) is longer than a few spaces,
> maybe 80, have not measured it, but of it goes past a threshold, I get
> nothing at all. 

$  TDS=8.0 sqsh -S$S -m bcp -U$U -P$P -C \
"select top 1  datalength(text) as nbytes, text from syscomments where
datalength(rtrim(text)) > 200" 

sqsh-2.1.5 Copyright (C) 1995-2001 Scott C. Gray
...
4136|create procedure sys.sp_MSalreadyhavegeneration
    (@genguid uniqueidentifier, 
     @subscribernick binary(6),
     @compatlevel int = 10) -- backward compatibility level,
default=Sphinx

as
    declare @nicknames varbinary(1000)
    declare @offset int
    declare @retcode int
    declare @dbname sysname
...

It must be something more specific than that.  sqsh uses ct-lib and can
readily retrieve wide text columns.  The above query returned 4136 bytes. 


--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.