Hello,

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

Any feedback would be much appreciated! Cheers, Victor

In reply to DBD::AnyData error message for DBI handle by vcutting

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.