Roland,
If you are using IIS4 I have seen this too. Try creating a script just to show you
the default
direcory or a listing of the files. What you will notice is that the script is being
run but the
default directory at runtime is NOT the directory where the script is (like in UNIX).
I have had to
put a relative path to files. for example the script is in a subdirctory of the web
server root
(test). Any file referenced needs to be 'test/data.dat' and not './data.txt'.
Miguel
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.
>
> Any help would be gratefully appreciated.
>
> TIA
>
> Roland
>
> --
> The information contained within this e-mail sent by Cradley Print Ltd. is
> confidential and is intended for the named recipient only. If you are not
> the intended recipient please notify us by telephone immediately on 01384
> 414100 (UK)or +(44)1384 414100 (International) or return it to us by e-mail
> quoting the name of the sender and the addressee. Please then delete it from
> your system.
>
> Encryption and Viruses
> ==================
> Please note that this e-mail and any attachments have not been encrypted.
> They may therefore be liable to be compromised. Please also note that it is
> your responsibility to scan this e-mail and any attachments for viruses.
> Viruses and compromises of security are inherent risks in relation to
> e-mail.
>
> We do not, to the extent permitted by law, accept any liability (whether in
> contract, negligence or otherwise) for any virus infection and/or external
> compromise of security and/or confidentiality in relation to transmissions
> sent by e-mail.
>
> Contracts
> ========
> Please note, that contracts may NOT be concluded on behalf of Cradley Print
> Ltd by e-mail, but contracts on behalf of our clients may be concluded by
> e-mail.
> _______________________________________________
> Perl-Win32-Database mailing list
> [EMAIL PROTECTED]
> http://listserv.ActiveState.com/mailman/listinfo/perl-win32-database
--
Work like you don't need the money.
Love like you've never been hurt.
Dance like nobody's watching.