If you're trying to use a dsn, I'm assuming you're using ODBC. If so, You'll
need to use DBI and connect using DBD::ODBC. You configure your DSN in your
ODBC data sources, and refer to it when you make a connection. Once the
connection is made, then you can define the statement handle (like it looks
like you're trying to do with the $dsn = qq{     line).

Once the connection, or connections are made, running the updates is just
like with any other dbi mod.

Steve Howard

-----Original Message-----
From: Jorge L. Allen [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 14, 2001 4:35 PM
Cc: [EMAIL PROTECTED]
Subject: Using perl to connec to ACCESS



It is first time connecting to Microsoft Access, and I cannot even  make a
simple connection.

The database is running and connected to the web using dreamweaver.
But I need to write perl scripts to update it.

use DBI;

$dsn = qq(dbi:Microsoft Access
  Driver:D\:\\\\Inetpub\\wwwroot\\temp\\doc_archive_test.mdb);
my $dbh = DBI->connect($dsn);


This is the error message:

Can't connect (dbi:Microsoft Access
Driver:d:\\Inetput\wwwroot\temp\doc_archive_test.mdb), no database driver
specified and DBI_DSN env var not set at <script name>.


Isn't the driver named "Microsoft Access Driver"

I know it is installed in the system DSN.

any help is appretiated.

Jorge Allen

Reply via email to