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:
problem with dbi and dbd installation

 



rajjj
Novice

Jul 28, 2006, 11:00 PM

Post #1 of 2 (2033 views)
problem with dbi and dbd installation Can't Post

hi all,

there is a problem with connecting oracle db. when i try to establish a connection by a sample script..given below

#use strict;
use Oracle;
#use DBI;


my $dbh = DBI->connect('DBI:Oracle:dsn','scott','tiger') or die "can't connect to the database";

my $sth = $ddh->prepare('select * from emp') or die 'u r dead';;

my $result= $sth->execute();

while(@arr= $result->fetchrow_array()){
$eno = $arr[0];
print $eno;
}



i got the follwoing error..

DBI object version 1.50 does not match $DBI::VERSION 1.51 at C:/Perl/lib/DynaLoader.pm line 253.
BEGIN failed--compilation aborted at C:/Perl/lib/DBI.pm line 259.
Compilation failed in require at C:/Perl/lib/Oracle.pm line 16.
BEGIN failed--compilation aborted at C:/Perl/lib/Oracle.pm line 16.
Compilation failed in require at sqltest.pl line 4.
BEGIN failed--compilation aborted at sqltest.pl line 4.

...

can any body resolve this ...



thanx


davorg
Thaumaturge / Moderator

Jul 31, 2006, 5:25 AM

Post #2 of 2 (2024 views)
Re: [rajjj] problem with dbi and dbd installation [In reply to] Can't Post

You shouldn't be using a module called Oracle.pm, you should be using DBI.pm.

It sounds like your versions of DBI and DBD::Oracle weren't installed properly. How did you install them?

--
Dave Cross, Perl Hacker, Trainer and Writer
http://www.dave.org.uk/
Get more help at Perl Monks

 
 


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

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