I have perl, v5.8.7 built for i686-linux running on gentoo.
I've installed the DBI::AnyData modules ( DBI, SQL::Statement, DBD::CSV,
AnyData, DBD::AnyData ) with perl -e 'use CPAN; install <whatever>'
I have the following script more or less copied from the CPAN example:
-- Start
#!/usr/bin/perl
use DBI;
my $dbh = DBI->connect('dbi:AnyData(RaiseError=>1):');
$dbh->func( 'users', 'Passwd', '/etc/passwd', 'ad_catalog');
my $sth = $dbh->prepare("SELECT username FROM users");
$sth->execute();
while (my $row = $sth->fetch) {
print "@$row\n";
}
$sth->finish();
$dbh->disconnect();
-- End
The script works ( lists all usernames from /etc/passwd ) but always
returns the following warning at the end:
DBI handle 0x8529630 cleared whilst still active.
dbih_clearcom (sth 0x8529630, com 0x85452e8, imp DBD::AnyData::st):
FLAGS 0x182195: COMSET Active Warn RaiseError PrintError PrintWarn
ShowErrorStatement
PARENT DBI::db=HASH(0x8529504)
KIDS 0 (0 Active)
IMP_DATA undef
NUM_OF_FIELDS 1
NUM_OF_PARAMS 0
The only help I can find on google says do '$sth->finish()', Well I did and it
didn't help.
Any idea what is going wrong here?
Stephen
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>