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 10:50:22 -0700

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.

I'm just beginning development so I could definitely code around that. But I'd rather not sprinkle rtrim() functions all over my SQL code if I can get away with it.

Thanks,
Dan

P.S. Setting up freetds on FreeBSD 4.8-STABLE was a breeze thanks to the docs and the list archives. Thanks to everyone who contributed to that (you know who you are)!

Michael Sims wrote:

RCS Computers wrote:

I have found several posts that talk about trailing spaces in output
from the freetds driver. I am connecting to a sybase database with
php

[...]

Some things I have read suggest changing the DB structure. That is
not an option.

[...]

So, I would like to know if I can change the freetds in some way,
either configuration or recompiliation, so that it mimics the Sybase
ODBC driver and trims the data of spaces automatically?


Which PHP extension are you using with FreeTDS? Is it the mssql extension,
the sybase extension, or the sybase-ct extension? The latter two extensions
(and possibly all three, I'm not sure) used to trim trailing spaces but this
was changed around PHP 4.3.3 or so. This broke a lot of my stuff at the
time so I maintain a local patch to PHP to restore the old trimming
behavior. I'd be glad to explain more offlist if you think you can use
this.

HTH

_______________________________________________
FreeTDS mailing list
FreeTDS AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds


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




Archive powered by MHonArc 2.6.24.

Top of Page