|
|
sybperl-l Archive
Up Prev Next
From: "Avis, Ed" <avised at kbcfp dot com>
Subject: $sth->{NAME} doesn't work
Date: Jan 14 2004 9:35AM
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
|