[freetds] trailing spaces

Michael Peppler mpeppler at peppler.org
Thu May 27 03:01:34 EDT 2004


On Wed, 2004-05-26 at 20:49, Lowden, James K wrote:
> > From: freetds-bounces at lists.ibiblio.org
> > [mailto:freetds-bounces at lists.ibiblio.org]On Behalf Of Dan Wierenga
> > 
> > I'm having the same problem with Perl connecting to SQL 
> > Server 2K via DBI and 
> > DBD::Sybase.   If anyone has a solution for that I'd love to hear it.
> 
> The DBI documentation says that a driver may implement the ChopBlanks
> statement handle attribute, and that if it doesn't, it should return
> undef.  
> 
> AFAICT, DBD::Sybase doesn't do either of those things.  You can set
> the attribute, but it has no effect.  That is,
> 
> 	$sth = $dbh->prepare($query);
> 	print $sth->{"ChopBlanks"} = 1;
> 
> doesn't alter whether or not the elements in the list returned by
> $sth->fetchrow are trimmed.  

Actually it *does* work - but only on char() columns. varchars and
things that are treated as varchar (i.e. nullable char) isn't affected
as they *should* be trimmed already.

Michael
-- 
Michael Peppler                              Data Migrations, Inc.
mpeppler at peppler.org                       http://www.peppler.org/
Sybase T-SQL/OpenClient/OpenServer/C/Perl developer available for short
or long term contract positions - http://www.peppler.org/resume.html





More information about the FreeTDS mailing list