Please do me a favour.



Hi,

I have installed Perl 5.6.1 on my windows XP .After that I have written
a small perl script and it run successfully.

When I execute another script(for connecting database and retreiving
data).It is showing DBI error.So I downloaded dbi module DBI-1.59.tar.gz
From the net and copied the DBI folder under the path C:\Program
Files\PERL\lib

Even though it is throwing the error like
"
Can't locate loadable object for module DBI in @INC (@INC contains:
C:/Program F
iles/PERL/lib C:/Program Files/PERL/site/lib .) at C:/Program
Files/PERL/site/li
b/DBI.pm line 243
BEGIN failed--compilation aborted at C:/Program
Files/PERL/site/lib/DBI.pm line
243.
Compilation failed in require at C:\Perl\dbtest.pl line 6.
BEGIN failed--compilation aborted at C:\Perl\dbtest.pl line 6. "

These is my code

#!/opt/perl5.6.1/bin/perl

use strict;
use DBI;

my $dbh = DBI->connect( 'dbi:Oracle:omega',
'omega',
'rez5mip2',
);

my $sql = qq{ SELECT indiv_firstname, indiv_lastname FROM ind,usr WHERE
ind.ind_cd=usr.ind_cd and usr_login='20224474'};
my $sth = $dbh->prepare( $sql );
$sth->execute();

while (@row = $sth->fetchrow_array) {
($indfirst, $indlast) = @row;

print "$indfirst\n";
print "$indlast\n";
}

$sth->finish;
$dbh->disconnect;

Please help me out to reslove this.

Regards
Sivakumar.M
.



Relevant Pages

  • Re: DBI v2 - The Plan and How You Can Help
    ... I can see room for all of them, but all of this is really a DBD, not a DBI, issue. ... and some of them have to resort to search-n-replace in the SQL string at execute() time since the database doesn't have native support. ... ie, on Pg the STHs would be built before the DB is connected, and on Oracle they are built the first time they are used. ... well I am thinking of large program environments here where data dictionaries and generated SQL are the norm. ...
    (perl.dbi.users)
  • request for clarification, was (DBD::DB2 execute and finish problem)
    ... DBI documentation says execute on a an active statement should imply a finish ...
    (perl.dbi.users)
  • Re: Memory access problem with DBI or DBD-Mysql?
    ... It seems that the problems are only with the "do" method and not with the "execute", so I looked for the differences between them. ... I want to repeat that the problem manifest itself only under OpenBSD because of it's memory management that cause the program to segfault if try to access a non allocated memory. ... I'm using DBI 1.45 and DBD-Mysql 2.9008. ...
    (perl.dbi.users)
  • Re: DBI v2 - The Plan and How You Can Help
    ... Darren Duncan wrote: ... of them, but all of this is really a DBD, not a DBI, issue. ... > DBD to decide whether to actually do anything with it immediately or not. ... a database) in your BEGIN block, and execute thousands of times after that. ...
    (perl.dbi.users)
  • Re: Tracing SQL queries done via DBI (mod_perl)
    ... There is a tracemethod on DBI, however, it does not properly print ... dbd_st_prepare calling count_params ... <- execute= 1 at dbitest.pl line 10 ... <- DESTROY= undef during global destruction ...
    (comp.lang.perl.misc)