[freetds] trailing spaces

Dan Wierenga dan at hornytoad.com
Wed May 26 16:32:46 EDT 2004

Lowden, James K wrote:

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

That works great, actually.  Thanks!

Different versions of Perl/DBI/DBD::Sybase perhaps?

> doesn't alter whether or not the elements in the list returned by $sth->fetchrow are trimmed.  
> However, DBD::Sybase treats char and varchar differently, in the expected way: char columns are blank padded; varchar are not.

At least on my version, both varchar and char are blank-padded.

Thanks for the help,

Dan Wierenga
IT Manager
HornyToad Inc.
mailto:dan at hornytoad.com

More information about the FreeTDS mailing list