Skip to Content.
Sympa Menu

freetds - [freetds] freetds silently truncating text/varchar/etc fields to 80 characters

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT freetds.org>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: [freetds] freetds silently truncating text/varchar/etc fields to 80 characters
  • Date: Sun, 3 May 2009 17:15:11 -0400

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



  • [freetds] freetds silently truncating text/varchar/etc fields to 80 characters, James K. Lowden, 05/03/2009

Archive powered by MHonArc 2.6.24.

Top of Page