Hi
I have succssfully Installed 'DBI' version 1.43 and 'DBD-Oracle' version 1.15 in ActivePerl 5.8.3.809 from http://ftp.esoftmatic.com/outgoing/DBI/5.8.3/ link.
But I installed I tried connecting to oracle database using PERL script
My Perl Script:-
#!/usr/local/bin/perl -w
#This will read a table called emp with two columns, fname and lname.
use strict;
use DBI;
my @data;
my ($dbh, $sth, @rows, $firstname, $lastname);
# connect to the database
$dbh = DBI->connect('dbi:Oracle:','scott', 'tiger')
or die "Couldn't connect to database: " . DBI->errstr;
# prepare an SQL statement
$sth = $dbh->prepare('
SELECT * FROM emp ORDER BY lname
') or die "Couldn't prepare statement: " . $dbh->errstr;
# execute the SQL statement
$sth->execute()
or die "Couldn't execute statement: " . $dbh->errstr;
# Read the matching records and print them out
while (@data = "" {
$firstname = $data[1];
$lastname = $data[2];
print "\t$$firstname $lastname\n";
}
# disconnect from the database
$dbh->disconnect
But I'm getting an following error and error message box :-
<<...OLE_Obj...>>
C:\>perl o.pl
install_driver(Oracle) failed: Can't load 'C:/Perl/site/lib/auto/DBD/Oracle/Oracle.dll' for module DBD::Oracle: load_file:The specified module could not be found at C:/Perl/lib/DynaLoader.pm line 229. at (eval 1) line 3
Compilation failed in require at (eval 1) line 3.
Perhaps a required shared library or dll isn't installed where expected at o.pl line 12
Thanks!!
Best Regards,
Satish Waghmare�
_______________________________________________ ActivePerl mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
