freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: Frediano Ziglio <freddyz77 AT tin.it>
- To: TDS Development Group <freetds AT franklin.oit.unc.edu>
- Subject: Re: Nulls in Query Results using DBD-Sybase-0.94
- Date: 23 Oct 2002 20:53:37 +0200
Il mer, 2002-10-23 alle 19:26, William ha scritto:
> Hello everyone,
>
> I'm using Perl 5.6.1, DBI-1.30, DBD-Sybase-0.94, Nightly Snapshot of
> FreeTDS, RH 7.3.
>
> In perl I do:
>
>
> $rows = $sth->dump_results;
>
> and the output is:
>
>
> DBI:Sybase:database=staff
> SELECT NAME FROM STAFF
> 'Admin............................'
> 'JAlvarez.........................'
> 'Rosa.rez.........................'
> 3 rows
>
> The column NAME in STAFF is defined as VARCHAR(40)
>
> The values returned from the query all have a null character attached to
> the end of the field value plus extra characters from the previous row.
>
> I was expecting:
>
>
> 'Admin'
> 'JAlvarez'
> 'Rosa'
>
> To get what I expected I clean up the query results by stripping everything
> after the first null.
>
> The same query with Perl 5.6.0, DBI-1.16, DBD-Sybase-0.91, Nightly Snapshot
> of FreeTDS-0.52, RH 7.1 worked as expected.
>
> Why are my query results different with the new versions?
>
> Thanks in advance,
>
> William
>
What server version are you using.
varchar can store null characters, so perhaps problem is in db, not on
freetds (old version strip character after first null, this has been
fixed before 0.60).
Try to issue (using tsql or other similar tools)
SELECT CHAR_LENGTH(NAME) AS LEN,NAME FROM STAFF
and check length returned
freddy77
-
Nulls in Query Results using DBD-Sybase-0.94,
William, 10/23/2002
- <Possible follow-up(s)>
- Re: Nulls in Query Results using DBD-Sybase-0.94, Frediano Ziglio, 10/23/2002
- Re: Nulls in Query Results using DBD-Sybase-0.94, William, 10/23/2002
Archive powered by MHonArc 2.6.24.