Problems making client perl connection to postgres server
Problems making client perl connection to postgres server
От:
fredj132@googlemail.com
Дата:
I need to connect a windows client running activestate perl 5.8.8 to a
postgres database running on windows 2003 server. I have loaded DBI:pg
module and DBD with various degrees of success. When I run a simple
test script to make a connection to the postgres database I get the
error:
H:\Src\Perl>perl pg1.pl
The procedure entry point Perl_newXS_flags could not be located in the
dynamic link library perl58.dll.
install_driver(Pg) failed: Can't load 'C:/Perl/site/lib/auto/DBD/Pg/
Pg.dll' for module DBD::Pg: load_file:The specified procedure
could not be found at C:/Perl/lib/DynaLoader.pm line 230.
at (eval 4) line 3
Compilation failed in require at (eval 4) line 3.
Perhaps a required shared library or dll isn't installed where
expected
at pg1.pl line 24
#
#
# a simple test script for connecting to the default
# PostgreSQL database.
#
# Copyright 2000 DVL Software Limited
#
# see http://freebsddiary.org/postgresql-perl.html
#
use DBI;
use strict;
my $dbh;
my $sth;
my @vetor;
my $field;
$dbh = DBI->connect("DBI:Pg:dbname=collector; host=myhost",
"postgres", "postgres");
if ($dbh) {
print "connected\n";
$sth = $dbh->prepare("SELECT * from table limit 20");
if (!defined($sth)) {
print "Cannot prepare $DBI::errstr\n";
}
if (!$sth->execute) {
print "Cannot execute $DBI::errstr\n";
}
print "
Re: Problems making client perl connection to postgres
server
От:
Colin Wetherbee <cww@denterprises.org>
Дата:
fredj132@googlemail.com wrote:
> I need to connect a windows client running activestate perl 5.8.8 to
> a postgres database running on windows 2003 server. I have loaded
> DBI:pg module and DBD with various degrees of success. When I run a
> simple test script to make a connection to the postgres database I
> get the error:
This seems to be a Perl-related or DBI-related issue. The dbi-users
mailing list would probably be a better place to ask.
http://lists.cpan.org/showlist.cgi?name=dbi-users
Colin