Hi..
I am new to the Perl programming.I am facing a problem with connecting to Oracle Database.
I am new to the Perl programming.I am facing a problem with connecting to Oracle Database.
See below script and error log for
details.
Please help me.
Please help me.
Thanks
~Satish
My Script:
use DBI;
my %test;
my %test;
$dbh =
DBI->connect("dbi:Oracle:(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=thl02566)(PORT=1529))(CONNECT_DATA=(SID=manthan)))",
'db2admin', 'db2admin', {AutoCommit => 0 } );
$sqlstatement="SELECT * FROM solution";
$sth = $dbh->prepare($sqlstatement);
$sth->execute || die "Could not execute SQL statement ... maybe invalid?";
$sth = $dbh->prepare($sqlstatement);
$sth->execute || die "Could not execute SQL statement ... maybe invalid?";
#output database results
while (@row=$sth->fetchrow_array()){
#print join('--',$row[0],$row[1], $row[2], "\n");
print "@row\n";
$test{$row[1].$row[2]} = $row[0];
}
print "printing in hash table \n";
while (@row=$sth->fetchrow_array()){
#print join('--',$row[0],$row[1], $row[2], "\n");
print "@row\n";
$test{$row[1].$row[2]} = $row[0];
}
print "printing in hash table \n";
while(($key,$value) = each %test) {
print join(" ","Hash Key = ", $key, "Hash Value = ", $value, "\n");
}
print join(" ","Hash Key = ", $key, "Hash Value = ", $value, "\n");
}
Error Generated:
C:\Perl\bin>perl
C:\te.pl
install_driver(Oracle) failed: Can't locate DBD/Oracle.pm in @INC (@INC contains
: C:/Perl/lib C:/Perl/site/lib .) at (eval 1) line 3.
Perhaps the DBD::Oracle perl module hasn't been fully installed,
or perhaps the capitalisation of 'Oracle' isn't right.
Available drivers: ExampleP, ODBC, Proxy.
at C:\te.pl line 5
install_driver(Oracle) failed: Can't locate DBD/Oracle.pm in @INC (@INC contains
: C:/Perl/lib C:/Perl/site/lib .) at (eval 1) line 3.
Perhaps the DBD::Oracle perl module hasn't been fully installed,
or perhaps the capitalisation of 'Oracle' isn't right.
Available drivers: ExampleP, ODBC, Proxy.
at C:\te.pl line 5
_______________________________________________ ActivePerl mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
