Skip to Content.
Sympa Menu

freetds - Re: [freetds] trailing spaces

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Dan Wierenga <dan AT hornytoad.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] trailing spaces
  • Date: Wed, 26 May 2004 13:32:46 -0700



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

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




Archive powered by MHonArc 2.6.24.

Top of Page