CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: DBI: Re: [pra_ml] DBD::ORACLE connectivity problem: Edit Log



FishMonger
Veteran / Moderator

Dec 30, 2008, 6:05 AM


Views: 2397
Re: [pra_ml] DBD::ORACLE connectivity problem

You need to install the Oracle database driver module DBD::Oracle.

http://search.cpan.org/~pythian/DBD-Oracle-1.22/Oracle.pm

Your method of assigning the ENV var is wrong.

It's better style and a "Best Practice" to put your use statements, which are loaded at compile time, before any other code. And, every Perl script you write should include the warnings and strict pragmas.


Code
#!/usr/local/bin/perl 

use warnings;
use strict;
use DBI;

$ENV{"ORACLE_HOME"} = "/x/home/oracle/product/8.1.7";
my $dbh = DBI->connect('DBI:Oracle:abcde', 'uname', 'passwd');



(This post was edited by FishMonger on Dec 30, 2008, 6:06 AM)


Edit Log:
Post edited by FishMonger (Veteran) on Dec 30, 2008, 6:06 AM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives