On Sun, 2004-04-11 at 16:07, Tim Bunce wrote:
> On Sat, Apr 10, 2004 at 06:28:54PM -0700, Michael Peppler wrote:
> > On Sat, 2004-04-10 at 11:51, [EMAIL PROTECTED] wrote:
> > 
> > > I'm using DBD::Sybase 1.02 and DBI 1.42.
> > > 
> > > The stored procedure writer here is telling me that she's sending
> > > a VARCHAR that's padded with spaces, but the spaces aren't there
> > > when I retrieve them with fetchrow_arrayref.
> > 
> > When a varchar() string is stored to the database it will be truncated
> > to remove any trailing spaces.
> 
> By the driver or the database? Can the driver prevent that happening?

By the database, and the driver can't do anything about it.

The only way to store trailing whitespace (or trailing NULL bytes for
binary values) is to use the fixed length CHAR and BINARY datatypes.

Michael
-- 
Michael Peppler                              Data Migrations, Inc.
[EMAIL PROTECTED]                       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

Reply via email to