hi,
Im using linux and i have postgresql 6.5 and perl 5.003 installed on system.
Im having problems connecting to postgresql where as ive pgsql_perl5
installed, only that im not sure whether its configured propely. well this
is the error i incur whenever i try to run my program :-
"can't locate pg.pm in @INC(@INC contains :/usr/lib/perl5/5.00503/i386-linux
/usr/lib/perl5.00503 /usr/lib/perl5/site_perl/5.005/i386-linux
/usr/lib/perl5/site_perl/5.005.) at connect.cgi
BEGIN failed --compilation aborted at connect.cgi "
well this my short perl program:
#!/usr/local/bin/perl
#
#perl sample program
use pg;
$conn =pg::connectdb("dbname=test");
die $conn->errorMessage unless PGRES_CONNECTION_OK eq $conn->status;
print "Enter User name :"
$username = <STDIN>;
chomp $username;
$result = $conn->exec(
"SELECT firstname,lastname,state,city,age from friends WHERE firstname =
'username'");
die $conn->errorMessage unless PGRES_TUPLES_OK eq $result->resultstatus;
while (@row = $result->fetchrow)
{
print @row, "\n";
}
please help.
thanks bye
Bonface Kisala.
-----------------------------------------------
FREE! The World's Best Email Address @email.com
Reserve your name now at http://www.email.com