freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
[freetds] freetds silently truncating text/varchar/etc fields to 80 characters
- From: Robert Jay <bryopsis AT gmail.com>
- To: freetds AT lists.ibiblio.org
- Subject: [freetds] freetds silently truncating text/varchar/etc fields to 80 characters
- Date: Thu, 23 Apr 2009 08:38:45 +1000
Hi,
Using freetds v0.83.dev.20090421 (threadsafe, default tds version=5.0)
connecting to a SQL2005 server i found that all of my text fields in INSERTs
were being truncated to 80 characters.
This is using Perl 5.10, and DBD::Sybase.
I managed to fix the problem (well at least bandaid it) by changing line 792
of src/tds/query.c from:
strcat(declaration, "varchar(80)");
to
strcat(declaration, "varchar(255)");
I don't know why it is not building the declaration properly, but could this
be changed to 255 instead of 80? It's a bit more of a sensible number. And
maybe a warning logged? Or an entry in the FAQ?
Thanks,
Rob.
-
[freetds] freetds silently truncating text/varchar/etc fields to 80 characters,
Robert Jay, 04/22/2009
-
Re: [freetds] freetds silently truncating text/varchar/etc fields to 80 characters,
James K. Lowden, 04/22/2009
- Re: [freetds] freetds silently truncating text/varchar/etc fields to 80 characters, James K. Lowden, 04/22/2009
- <Possible follow-up(s)>
- [freetds] freetds silently truncating text/varchar/etc fields to 80 characters, Robert Jay, 04/23/2009
-
Re: [freetds] freetds silently truncating text/varchar/etc fields to 80 characters,
James K. Lowden, 04/22/2009
Archive powered by MHonArc 2.6.24.