On Mon, 2003-03-31 at 15:25, Tim Bunce wrote:
> On Mon, Mar 31, 2003 at 02:01:30PM -0800, Michael Peppler wrote:
> > On Mon, 2003-03-31 at 11:36, Karyn Ulriksen wrote:
> > > This worked pretty well before. But, now, it appears that if the result of
> > > the query is a null set, it pukes with a:
> > >
> > > Can't get DBI::st=HASH(0x811cfa8)->{NAME}: unrecognised attribute at <my
> > > package>
> >
> > Hmmm - I don't think that this is a problem with DBD::Sybase. However I
> > believe that there was (or maybe still is) a bug with FreeTDS and empty
> > result sets where the columns don't get set up correctly.
>
> Odd that it should say that NAME is unrecognised, rather than return
> a ref to an empty array - which would seem like a better failure mode.
DBI 1.30 behaves correctly (from the user's perspective). 1.35 fails.
The problem is that FreeTDS 0.61 skips one step when returning an empty
result set, so DBD::Sybase never sets up the result array.
This is fixed in the CVS version of freetds - I just tried this with the
latest freetds snapshot (0.62-dev) and it worked correctly.
Michael
--
Michael Peppler Data Migrations, Inc.
[EMAIL PROTECTED] 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