Roland Corbet wrote:
> 
> I'm trying to start using DBD::CSV on a Windows NT server, using ActivePerl
> builds 613 to 623.  The script is then to be moved to a Unix environment
> after development.
> 
> I seem to be having problems getting the script to open up the specified
> directory and use the enclosed .csv files as the tables of the database.
> 
> I am using the code below:
> 
> require DBI;
> 
> $PATH = ".";
> #$PATH = "D:/test/121/data";
> 
> $dbh =
> 
>DBI->connect("DBI:CSV:f_dir=$PATH;csv_eol=\n;csv_sep_char=,;csv_quote_char=;csv_escape_char=");
> 
> $sth = $dbh->prepare("SELECT * FROM users");
> $sth->execute();
> 
> The csv files are contained in D:/test/121/data.  The file I am trying to
> access is users.csv.
> 
> I've tried all the path formatting I can think of, and the ones above are
> just a couple of the examples I've tried.  I usually get an error along the
> lines of "can't open .\users: no such file or directory ..."
> 
> I've even tried using "." as the pathname (meaning the same dir as the
> script), and included users.csv in the same dir as the script itself.
> 
> It would be really helpful if I could see some example code that runs on a
> Windows version of Perl.
> 

Did you create the 'users' table?

Reply via email to