in reply to Trouble getting DBD::CSV to work

f_dir:root => f_dir=root


Enjoy, Have FUN! H.Merijn

Replies are listed 'Best First'.
Re^2: Trouble getting DBD::CSV to work
by paulski82 (Novice) on Aug 05, 2014 at 07:21 UTC
    I've tried:
    my $dbh = DBI->connect ("dbi:CSV:f_dir=/root", undef, undef, { f_ext => ".csv", RaiseError => 1, } );
    and
    my $dbh = DBI->connect ("dbi:CSV:f_dir=root", undef, undef, { f_ext => ".csv", RaiseError => 1, } );
    and
    my $dbh = DBI->connect ("dbi:CSV:", undef, undef, { f_ext => ".csv", RaiseError => 1, f_dir => "/root", } );
    and:
    my $dbh = DBI->connect ("dbi:CSV:", undef, undef, { f_ext => ".csv", RaiseError => 1, f_dir => "root", } );
    But none of these work. Can you please clarify what you meant?

      Your original post said "dbi:CSV:f_dir:/root, which was obviously wrong, and thus most likely the cause of failure.

      Assuming you have recent enough versions of the modules you use, what is the output of:

      use strict; use warnings; use DBI; my $dbh = DBI->connect ("dbi:CSV:", undef, undef, { f_dir => "/root", f_ext => ".csv/r", RaiseError => 1, PrintError => 1, ShowErrorStatement => 1, }); print "DBI-$DBI::VERSION\n"; print "DBD::CSV-$DBD::CSV::VERSION\n"; print "Text::CSV_XS-$Text::CSV_XS::VERSION\n"; print "SQL::Statement-$SQL::Statement::VERSION\n"; print "\n"; print "$_\n" for $dbh->tables (undef, undef, undef, undef);

      Enjoy, Have FUN! H.Merijn
        DBI-1.609 DBD::CSV-0.22 Text::CSV_XS-0.85 SQL::Statement-1.27 "root".export "root".export3 "root".export2