freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
Re: [freetds] Possible bug: DBD::Sybase + current FreeTDS + selectall_hashref
- From: Michael Peppler <mpeppler AT peppler.org>
- To: freetds AT lists.ibiblio.org
- Subject: Re: [freetds] Possible bug: DBD::Sybase + current FreeTDS + selectall_hashref
- Date: 03 Feb 2003 17:08:21 -0800
On Mon, 2003-02-03 at 11:19, Martin Schroth wrote:
> Hi,
>
> DBI gets the following error if there are no rows to return:
> Can't get DBI::st=HASH(0x...)->{NAME}: unrecognised attribute
>
> Example:
> my $stmt = "SELECT 1 FROM test WHERE 1=0"
> my $hash = $dbh->selectall_hashref($stmt,1);
This works fine when used with the Sybase libs, so I suspect a slight
difference in return values.
> -> execute for DBD::Sybase::st (DBI::st=HASH(0x81f9964)~0x81f9940)
> thr#804b3c0
> syb_st_execute() -> ct_command() OK
> syb_st_execute() -> ct_send() OK
> st_next_result() -> ct_results(4046) == 1
And this is the difference. With the Sybase libs I get:
syb_st_execute() -> ct_command() OK
syb_st_execute() -> ct_send() OK
st_next_result() -> ct_results(4040) == 1
ct_res_info() returns 1 columns
ct_describe(0): type = 8, maxlen = 4
describe() -> col 0, type 8, realtype 8
describe() retcode = 1
st_next_result() -> lasterr = 0, lastsev = 0
FreeTDS returns no data at all, whereas you should still get the column
description even if there are no rows returned.
Michael
--
Michael Peppler Data Migrations, Inc.
mpeppler AT peppler.org http://www.mbay.net/~mpeppler
Sybase T-SQL/OpenClient/OpenServer/C/Perl developer available for short or
long term contract positions - http://www.mbay.net/~mpeppler/resume.html
-
[freetds] Possible bug: DBD::Sybase + current FreeTDS + selectall_hashref,
Martin Schroth, 02/03/2003
- Re: [freetds] Possible bug: DBD::Sybase + current FreeTDS + selectall_hashref, Michael Peppler, 02/03/2003
Archive powered by MHonArc 2.6.24.