Thread: initialisation failed
Hi
I have insatlled DBI1.13 for PostgreSQL in my Redhat 5. I have written a program(in PERL5) to connect to a database in postgreSQL.,It is giving some problems when I am trying to execute it.
Can anybody help me solve this problem??..
The program I have written,
#! /usr/bin/perl
use DBI;
$dbh = DBI->connect("dbi:Pg:dbname=manoj","" , "",
{ RaiseError => 1, AutoCommit => 0 })||die("Can't conne
ct ");
$sth=$dbh->prepare("select * from manoj1");
$dbh->disconnect;
print $sth;
~
$dbh = DBI->connect("dbi:Pg:dbname=manoj","" , "",
{ RaiseError => 1, AutoCommit => 0 })||die("Can't conne
ct ");
$sth=$dbh->prepare("select * from manoj1");
$dbh->disconnect;
print $sth;
~
Error I got while executing
DBD::Pg initialisation failed: Can't locate object method "driver" via package "
DBD::Pg" at /usr/lib/perl5/site_perl/DBI.pm line 481.
DBD::Pg" at /usr/lib/perl5/site_perl/DBI.pm line 481.
Perhaps the capitalisation of DBD 'Pg' isn't right. at test.pl line 2
Regards
Manoj