in reply to Problem parsing semicolon delimited file with DBD::CSV

Your title says you're using DBD::CSV, but you're using DBD::AnyData. It's no suprise that DBD::CSV's csv_sep_char doesn't work if you're not using DBD::CSV.

You should be using

my $dir = "C:\\Doc...\\ParsingXML"; my $dbh = DBI->connect("dbi:CSV:f_dir=$dir;csv_sep_char=\\;"); my $sth = $dbh->prepare("SELECT Station, Date, Time FROM log");

(Note: That opens C:\Doc...\ParsingXML\log. Not sure how to open C:\Doc...\ParsingXML\log.jdb.)

Update: It is not possible to specify an alternate sperator with DBD::AnyData. The only options for AnyData's CSV handler are col_names, eol, quotechar and escape_char.

Replies are listed 'Best First'.
Re^2: Problem parsing semicolon delimited file with DBD::CSV
by jZed (Prior) on Jul 27, 2006 at 03:48 UTC
    I'll have to look at the docs to see what gave you that impression, but you're wrong, you can also specify the sep_char, see my answer below.

    update Well having looked at the docs, I see that the reason you got that impression is because I didn't mention anything about it :-(. I'll correct that in the next release, thanks for causing me to look.