vcutting has asked for the wisdom of the Perl Monks concerning the following question:
Newbie to Perl. Using the DBD::AnyData module with a simple test case:
use strict; use DBI; my $dbh = DBI->connect('dbi:AnyData(RaiseError=>1):'); $dbh->func( 'test', 'CSV', 'mytest.csv', 'ad_catalog' ); my $sth = $dbh->prepare( "SELECT * FROM test" ); $sth->execute(); while (my $row = $sth->fetch) { print "@$row\n"; } $dbh->disconnect;
When I run the above code, the data prints out fine but I get the error:
DBI handle 0x1d9e180 cleared whilst still active. dbih_clearcom (sth 0x1d9e180, com 0x1d9f3c4, imp DBD::AnyData::st) +: FLAGS 0x182195: COMSET Active Warn RaiseError PrintError PrintW +arn ShowErrorStatement PARENT DBI::db=HASH(0x1d9e084) KIDS 0 (0 Active) IMP_DATA undef NUM_OF_FIELDS 4 NUM_OF_PARAMS 0
I did find a post on this site saying to use the temporary fix ( $sth->{Active}=0; ) but I think that temporary fix was for another problem (STORE method in DBD::File??). This temporary fix does prevent the error message I'm getting from displaying though!
My Question: Should I just continue to use the temporary fix for the error I get or will that likely cause some other problems?
Currently the modules I have installed that are referenced by DBD::AnyData are:
DBI 1.48
AnyData 0.10
DBD::AnyData 0.08
DBD::File 0.33
SQL::StateMent 1.14
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: DBD::AnyData error message for DBI handle
by jZed (Prior) on Jun 13, 2005 at 17:40 UTC | |
by bart (Canon) on Jun 13, 2005 at 17:58 UTC | |
by jZed (Prior) on Jun 13, 2005 at 18:03 UTC | |
|
Re: DBD::AnyData error message for DBI handle
by ikegami (Patriarch) on Jun 13, 2005 at 17:58 UTC | |
by jZed (Prior) on Jun 13, 2005 at 18:06 UTC |