HOWTO Install DBI perl module by jferreir
=========================================

Learn more about DBI module (if you chose to install this perl module)
-> http://www.oreilly.com/catalog/perldbi/chapter/ch04.html

It is assumed that ActivePerl-5.6.1.631-MSWin32-x86.msi is installed on your
machine
or another ActivePerl version. Otherwise install it!

ActiveState perl was compiled with Microsoft Visual C,
if you plan to install any modules follow the steps.

Basically - you have three options:

1) Use Programmer's Package Manager(ppm) tool, 
to install already prepared modules by ActiveState people. 
Look into ActiveState's perl documentation, how actually to do that. 
You don't need to download this tool. It is already installed with your 
ActivePerl version.

Learn more about Programmer's Package Manager(PPM) tool 
->http://aspn.activestate.com/ASPN/Products/ActivePerl/faq/ActivePerl-faq2.h
tml

2) Install perl from cygwin, and use it instead of ActiveState one. 

3) Buy Microsoft Visual C to compile your module.

4) Maybe others....


We are going to take the option number 1(the easiest one I find):


Go to the directory where you installed ActivePerl.

1- The path is for example in my case C:/Perl/bin

2- Run ppm3
   C:\Perl\bin>ppm3

3- If you want to install DBI you should install also DBD(Database Drivers)
   then you have to install more than the DBI module.

To install DBI module

ppm>install DBI

Now we need to install your correponding driver.
If you have a Oracle database, you need the DBD-Oracle package, then install
it.

pmm>install DBD-Oracle

Or if you have another database, you should find your driver
try to find if it is available. 

ppm>search DBD

Note the name of this one for example DBD-ODBC and install it.

ppm>install DBD-ODBC 

It's easy, isn't it? :-)

If you want to display the list of all installed packages

ppm> query * 
exit ppm

ppm>quit

Execute a .pl file to see if you are able to connect to the database.
Sample source code is given on this URL:
http://www.oreilly.com/catalog/perldbi/chapter/ch04.html


That's all ;-)!


Have a lot of fun!!!

Jos� Ferreiro

Jos� Ferreiro





Reply via email to