|
|
sybperl-l Archive
Up Prev Next
From: "Avis, Ed" <avised at kbcfp dot com>
Subject: RE: $sth->{NAME} doesn't work
Date: Jan 14 2004 3:38PM
Jayson Pifer - Thanks for pointing out that you need to execute() a
statement handle before you can get {NAME} from it. This is a bit
surprising since the column labels can be determined without seeing the
data returned, but I guess it's a limitation of DBD::Sybase. The DBI
doc does say
Note that some drivers cannot provide valid values for some or all of
these attributes until after "$sth->execute" has been called.
and I should have paid more attention to that.
A couple of feature requests, then. For DBI, if the driver does not
provide an attribute until after $sth->execute() then the error should
indicate this, for example
NAME attribute not available with this driver until you execute()
rather than 'unrecognised attribute'. Perhaps this will mean drivers
letting DBI know which attributes this applies to, I don't know.
For DBD::Sybase would it be possible to get NAME working without
executing the query? If the Open Client libs allow this.
--
Ed Avis
|