07-13-2005, 04:16 PM | #1 (permalink) |
Junkie
Location: Classified
|
[Perl]Installing DBI (Database Interface Module)
I'd like to use the "use DBI;" statement in my Perl scripts so I can use the DBI module to read from a database. I have books and have visited web sites that are really great at explaining how to code and use this once you have the module installed.
Does anyone know a good site that gives directions as to how you'd go about doing this? Please? I feel like I moron -- I understand the code and have written other non-database related Perl programs, but I can't figure out how to install the module. I read and followed the Perl documentation. When I try to do this and use the 'make' command at the command prompt, it doesn't do anything. For Windows, it says the command may be 'nmake' or 'dmake'. If you know a site, or even a good message borad where I can ask about this, please let me know. I am running Perl 5.8 on XP Pro. |
07-13-2005, 05:54 PM | #2 (permalink) |
Darth Papa
Location: Yonder
|
Are you using ActivePerl? If so, you have PPM, ActiveState's Perl Package Manger, and you should use that to install DBI and most any other module.
FAQs and usage information here: http://aspn.activestate.com/ASPN/doc...Perl-faq2.html Now, bear in mind, you'll need a database to talk to with DBI. The classic one to use with Perl is MySQL, but DBI can interface with a broad range of databases, including ODBC interfaces (like Access or MSSQL). Last edited by ratbastid; 07-13-2005 at 05:56 PM.. |
07-14-2005, 02:21 AM | #3 (permalink) |
Insane
|
If you have CPAN installed, just run the CPAN script and while you're at the shell type "install DBI"
http://www.start-linux.com/articles/article_34.php This should get you started. I guess you could substitute your way if you're using Windows.
__________________
"You looked at me as if I was eating runny eggs in slow motion." - Gord Downie of The Tragically Hip |
07-16-2005, 10:11 AM | #5 (permalink) |
Junkie
Location: Classified
|
Thanks so much, ratbastid. I didn't know about PPM. I have a "For Dummies" book, which didn't mention it.
All I had to do was type "install DBI" and I got it! I also typed "search DBD" and got an ODBC package. I used it to connect to an Access database - yeehaw! |
Tags |
database, dbi, interface, module, perlinstalling |
|
|