|
|
sybperl-l Archive
Up Prev Next
From: "Jayson Pifer" <JPifer at jefco dot com>
Subject: Re: $sth->{NAME} doesn't work
Date: Jan 14 2004 2:29PM
$sth->execute;
--Jayson
"Avis, Ed"
Sent by: owner-sybperl-l@peppler.org
01/14/04 04:35 AM
To:
cc:
Subject: $sth->{NAME} doesn't work
I am trying to use $sth->{NAME} to get the column names in a query
result. I think I'm following the DBI docs, but I get the error
Can't get DBI::st=HASH(0x804c00c)->{NAME}: unrecognised attribute
This is with DBI-1.30 and DBD::Sybase-1.02.3 (sent to me by mpeppler).
The test program is
use warnings;
use strict;
use DBI;
my $dbh =
DBI->connect('dbi:Sybase:server=MY_SERVER;database=my_database',
'me', 'password',
{ RaiseError => 1, AutoCommit => 0 });
my $sth = $dbh->prepare('select 5 as five');
print @{$sth->{NAME}};
disconnect $dbh;
Interestingly, if I change NAME to NAME_uc or NAME_lc in the above
program I still get the same error message. Am I doing something wrong
or is NAME not supported by DBD::Sybase?
--
Ed Avis
Jefferies archives and reviews outgoing and incoming e-mail. It may be produced at the request of regulators or in connection with civil litigation.
Jefferies accepts no liability for any errors or omissions arising as a result of transmission. Use by other than intended recipients is prohibited.
|