develooper Front page | perl.dbi.users | Postings from July 2001

Re: MSAccess

From:
Bart Lateur
Date:
July 19, 2001 03:36
Subject:
Re: MSAccess
Message ID:
69ddltko7ua2fnsb1me6mcllroud00nb90@4ax.com
On Mon, 16 Jul 2001 14:46:00 -0700 (PDT), Pallavi Patil wrote:

>When I try to use DBI, it says that can't locate
>dbi.pm in c:\perl\lib
>
>I would appreciate, if you can tell me how to go for
>it.

DBI.pm for MSWin32 is available from
<http://www.activestate.com/PPMpackages/5.6plus/> (the .ppd file) and
its subdirectory "MSWin32-x86-multi-thread" (the .tar.gz file). If you
have a direct internet connection on your PC, and with ActiveState perl,
you can use PPM to install it directly, from the DOS prompt. Otherwise,
you'll have to locally save both the .ppd file and the .tar.gz file,
edit the .ppd file so it points to the local .tar.gz file, with a
relative URL, instead of the absolute one pointing to the above site;
and install from there.

In the same way, you can get and install DBD::ODBC.

Then, you'd best create a system DSN. Go to the control panels, open the
one for ODBC, click on the system-DSN tab, click on "add", select the
Access mdb driver, finish, select your MDB file, and give it a name.
Let's say you called it "my_Access_db".

The minimal perl code is:

	use DBI;
	my $dbh = DBI->connect("DBI:ODBC:my_Access_db", "", "");

(no user name and password) and you're off.

-- 
	Bart.



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About