zli034 has asked for the wisdom of the Perl Monks concerning the following question:
I have many csv file to orgnize. I try to use dbi:csv but not a clue.
use DBI; $dbh = DBI->connect("DBI:CSV:f_dir=/base/") or die "Cannot connect: " . $DBI::errstr; $sth = $dbh->prepare("CREATE TABLE a (id INTEGER, name CHAR(10))") or die "Cannot prepare: " . $dbh->errstr(); $sth->execute() or die "Cannot execute: " . $sth->errstr(); $sth->finish(); $dbh->disconnect();
When I use this code, where is the data base locates? Is that a file or something else? Can I use a existing csv file as a data base? I totally dont know how to ge the codes from cpan work for me.
Code tags added by GrandFather
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: dbi:csv how to
by ptum (Priest) on Oct 27, 2006 at 22:48 UTC | |
|
Re: dbi:csv how to
by madbombX (Hermit) on Oct 28, 2006 at 00:57 UTC | |
|
Re: dbi:csv how to
by Cabrion (Friar) on Oct 27, 2006 at 23:13 UTC |