Skip to Content.
Sympa Menu

freetds - RE: [freetds] trailing spaces

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Michael Peppler <mpeppler AT peppler.org>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] trailing spaces
  • Date: Thu, 27 May 2004 09:01:34 +0200

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






Archive powered by MHonArc 2.6.24.

Top of Page